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, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

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(0..1)
  when 0 then true
  when 1 then false
  end
end