Class: Faker::Beer
Constant Summary
Constants inherited from Base
Faker::Base::LLetters, Faker::Base::Letters, Faker::Base::NOT_GIVEN, Faker::Base::Numbers, Faker::Base::ULetters
Class Method Summary collapse
-
.alcohol ⇒ String
Produces a random beer alcohol percentage.
-
.blg ⇒ String
Produces a random beer blg level.
-
.hop ⇒ String
Produces a random beer hops.
-
.ibu ⇒ String
Produces a random beer IBU.
-
.malts ⇒ String
Produces a random beer malt.
-
.name ⇒ String
Produces a random beer name.
-
.style ⇒ String
Produces a random beer style.
-
.yeast ⇒ String
Produces a random beer yeast.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale
Class Method Details
.alcohol ⇒ String
Produces a random beer alcohol percentage.
95 96 97 |
# File 'lib/faker/default/beer.rb', line 95 def alcohol "#{rand(2.0..10.0).round(1)}%" end |
.blg ⇒ String
Produces a random beer blg level.
108 109 110 |
# File 'lib/faker/default/beer.rb', line 108 def blg "#{rand(5.0..20.0).round(1)}°Blg" end |
.hop ⇒ String
Produces a random beer hops.
43 44 45 |
# File 'lib/faker/default/beer.rb', line 43 def hop fetch('beer.hop') end |
.ibu ⇒ String
Produces a random beer IBU.
82 83 84 |
# File 'lib/faker/default/beer.rb', line 82 def ibu "#{rand(10..100)} IBU" end |
.malts ⇒ String
Produces a random beer malt.
69 70 71 |
# File 'lib/faker/default/beer.rb', line 69 def malts fetch('beer.malt') end |
.name ⇒ String
Produces a random beer name.
17 18 19 |
# File 'lib/faker/default/beer.rb', line 17 def name fetch('beer.name') end |
.style ⇒ String
Produces a random beer style.
30 31 32 |
# File 'lib/faker/default/beer.rb', line 30 def style fetch('beer.style') end |
.yeast ⇒ String
Produces a random beer yeast.
56 57 58 |
# File 'lib/faker/default/beer.rb', line 56 def yeast fetch('beer.yeast') end |