Class: Faker::Beer

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/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, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, sample, shuffle, translate, unique, with_locale

Class Method Details

.alcoholObject



31
32
33
# File 'lib/faker/beer.rb', line 31

def alcohol
  rand(2.0..10.0).round(1).to_s + '%'
end

.blgObject



35
36
37
# File 'lib/faker/beer.rb', line 35

def blg
  rand(5.0..20.0).round(1).to_s + '°Blg'
end

.hopObject



15
16
17
# File 'lib/faker/beer.rb', line 15

def hop
  fetch('beer.hop')
end

.ibuObject



27
28
29
# File 'lib/faker/beer.rb', line 27

def ibu
  rand(10..100).to_s + ' IBU'
end

.maltsObject



23
24
25
# File 'lib/faker/beer.rb', line 23

def malts
  fetch('beer.malt')
end

.nameObject



7
8
9
# File 'lib/faker/beer.rb', line 7

def name
  fetch('beer.name')
end

.styleObject



11
12
13
# File 'lib/faker/beer.rb', line 11

def style
  fetch('beer.style')
end

.yeastObject



19
20
21
# File 'lib/faker/beer.rb', line 19

def yeast
  fetch('beer.yeast')
end