Class: Faker::Beer
- Inherits:
-
Base
show all
- Defined in:
- lib/faker/default/beer.rb
Constant Summary
Constants inherited
from Base
Faker::Base::Letters, Faker::Base::Numbers, Faker::Base::ULetters
Class Method Summary
collapse
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale
Class Method Details
.alcohol ⇒ Object
32
33
34
|
# File 'lib/faker/default/beer.rb', line 32
def alcohol
rand(2.0..10.0).round(1).to_s + '%'
end
|
.blg ⇒ Object
36
37
38
|
# File 'lib/faker/default/beer.rb', line 36
def blg
rand(5.0..20.0).round(1).to_s + '°Blg'
end
|
.hop ⇒ Object
16
17
18
|
# File 'lib/faker/default/beer.rb', line 16
def hop
fetch('beer.hop')
end
|
.ibu ⇒ Object
28
29
30
|
# File 'lib/faker/default/beer.rb', line 28
def ibu
rand(10..100).to_s + ' IBU'
end
|
.malts ⇒ Object
24
25
26
|
# File 'lib/faker/default/beer.rb', line 24
def malts
fetch('beer.malt')
end
|
.name ⇒ Object
8
9
10
|
# File 'lib/faker/default/beer.rb', line 8
def name
fetch('beer.name')
end
|
.style ⇒ Object
12
13
14
|
# File 'lib/faker/default/beer.rb', line 12
def style
fetch('beer.style')
end
|
.yeast ⇒ Object
20
21
22
|
# File 'lib/faker/default/beer.rb', line 20
def yeast
fetch('beer.yeast')
end
|