Module: FFaker::Boolean

Extended by:
Boolean, ModuleUtils
Included in:
Boolean
Defined in:
lib/ffaker/boolean.rb

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Instance Method Details

#maybeObject Also known as: random, sample



8
9
10
11
12
13
# File 'lib/ffaker/boolean.rb', line 8

def maybe
  case rand(2)
  when 0 then true
  when 1 then false
  end
end