Class: Faker::Boolean
Constant Summary
Constants inherited from Base
Faker::Base::Letters, Faker::Base::Numbers, Faker::Base::ULetters
Class Method Summary collapse
Methods inherited from Base
bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand_in_range, regexify, translate, unique, with_locale
Class Method Details
.boolean(true_ratio = 0.5) ⇒ Object
4 5 6 |
# File 'lib/faker/boolean.rb', line 4 def boolean(true_ratio = 0.5) (rand < true_ratio) end |