Module: RandomData::Booleans
- Included in:
- Random
- Defined in:
- lib/random_data/booleans.rb
Instance Method Summary collapse
-
#boolean ⇒ Object
Returns true or false randomly.
Instance Method Details
#boolean ⇒ Object
Returns true or false randomly
5 6 7 |
# File 'lib/random_data/booleans.rb', line 5 def boolean rand(2) == 1 ? true : false end |