Module: RandomData::Booleans

Included in:
Random
Defined in:
lib/random_data/booleans.rb

Instance Method Summary collapse

Instance Method Details

#booleanObject

Returns true or false randomly



5
6
7
# File 'lib/random_data/booleans.rb', line 5

def boolean
  rand(2) == 1 ? true : false
end