Module: FFaker::Boolean
Instance Method Summary collapse
- #maybe ⇒ Object (also: #random, #sample)
Methods included from ModuleUtils
const_missing, k, luhn_check, underscore, unique
Methods included from RandomUtils
#fetch_sample, #rand, #shuffle
Instance Method Details
#maybe ⇒ Object 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 |