Module: Mash
- Defined in:
- lib/mash.rb
Overview
Various mash calculations
Class Method Summary collapse
-
.infusion_volume(data) ⇒ Float
Calculates volume of boiling water needed to increase mash temperature.
-
.strike_temperature(data) ⇒ Fixnum
Calculates strike water temperature.
Class Method Details
.infusion_volume(data) ⇒ Float
Note:
Temperatures must be measured in Celsius, mass in kilograms and volume in liters
Calculates volume of boiling water needed to increase mash temperature
49 50 51 52 53 54 55 |
# File 'lib/mash.rb', line 49 def self.infusion_volume data target = data[:target] ((target - data[:initial]) * ((0.41 * data[:mass]) + data[:volume]) / (100 - target)).round 1 end |
.strike_temperature(data) ⇒ Fixnum
Note:
Temperatures must be measured in Celsius, ratio is liters per kilograms
Calculates strike water temperature
25 26 27 28 29 30 31 32 |
# File 'lib/mash.rb', line 25 def self.strike_temperature data adjustment = data[:adjustment] || 1 target = data[:target] (((0.41 / data[:ratio]) * (target - data[:initial]) + target) * adjustment).round end |