Ruby random boolean
Simple tip how to get random boolean in very elegant way:
[true, false].sample
Written by Julius
Related protips
1 Response
Also gotta luv .shuffle
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#