Class: Faker::Beer
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, rand_in_range, regexify, respond_to_missing?, sample, shuffle, translate, unique, with_locale
Class Method Details
.alcohol ⇒ Object
30
31
32
|
# File 'lib/faker/beer.rb', line 30
def alcohol
rand(2.0..10.0).round(1).to_s + '%'
end
|
.blg ⇒ Object
34
35
36
|
# File 'lib/faker/beer.rb', line 34
def blg
rand(5.0..20.0).round(1).to_s + '°Blg'
end
|
.hop ⇒ Object
14
15
16
|
# File 'lib/faker/beer.rb', line 14
def hop
fetch('beer.hop')
end
|
.ibu ⇒ Object
26
27
28
|
# File 'lib/faker/beer.rb', line 26
def ibu
rand(10..100).to_s + ' IBU'
end
|
.malts ⇒ Object
22
23
24
|
# File 'lib/faker/beer.rb', line 22
def malts
fetch('beer.malt')
end
|
.name ⇒ Object
6
7
8
|
# File 'lib/faker/beer.rb', line 6
def name
fetch('beer.name')
end
|
.style ⇒ Object
10
11
12
|
# File 'lib/faker/beer.rb', line 10
def style
fetch('beer.style')
end
|
.yeast ⇒ Object
18
19
20
|
# File 'lib/faker/beer.rb', line 18
def yeast
fetch('beer.yeast')
end
|