/usr/share/rubygems-integration/all/gems/faker-1.6.6/lib/faker/beer.rb is in ruby-faker 1.6.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # encoding: utf-8
module Faker
class Beer < Base
flexible :beer
class << self
def name
fetch('beer.name')
end
def style
fetch('beer.style')
end
def hop
fetch('beer.hop')
end
def yeast
fetch('beer.yeast')
end
def malts
fetch('beer.malt')
end
def ibu
rand(10..100).to_s + ' IBU'
end
def alcohol
rand(2.0..10.0).round(1).to_s + '%'
end
def blg
rand(5.0..20.0).round(1).to_s + '°Blg'
end
end
end
end
|