Class: Beerxml::Hop

Inherits:
Model
  • Object
show all
Defined in:
lib/beerxml/hop.rb

Instance Method Summary collapse

Methods inherited from Model

beerxml_name, beerxml_plural_name, #beerxml_relationships, collection_from_xml, #each_beerxml_relationship, from_xml, #from_xml, inherited, #read_xml_field, #to_beerxml, #to_xml, xml_attr_name

Instance Method Details

#aauObject



33
34
35
# File 'lib/beerxml/hop.rb', line 33

def aau
  alpha * amount.in('ounces').to_f
end

#tinseth(post_boil_og, batch_size) ⇒ Object Also known as: ibus

batch size is gallons or Unit



24
25
26
27
28
29
30
# File 'lib/beerxml/hop.rb', line 24

def tinseth(post_boil_og, batch_size) # batch size is gallons or Unit
  bigness = 1.65 * 0.000125**(post_boil_og - 1)
  boil_factor = (1 - 2.72 ** (-0.04 * time.in_minutes.to_f)) / 4.15
  utilization = bigness * boil_factor
  ibus = utilization * (aau * 0.01 * 7490) / U(batch_size, 'gallons').to_f
  Beerxml.round(ibus, 1)
end