Module: Yeast
- Defined in:
- lib/yeast.rb
Overview
Various yeast related calculations
Class Method Summary collapse
-
.attenuation(original, current) ⇒ Fixnum
Calculates apparent attenuation.
-
.cells_required(data) ⇒ Fixnum
Calculates yeast cells required for fermentation.
Class Method Details
.attenuation(original, current) ⇒ Fixnum
Note:
Extract must be measured in Plato
Calculates apparent attenuation
46 47 48 |
# File 'lib/yeast.rb', line 46 def self.attenuation original, current (((original - current) / original) * 100).round end |
.cells_required(data) ⇒ Fixnum
Note:
Extract must be measured in Plato, volume in liters
Calculates yeast cells required for fermentation
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/yeast.rb', line 23 def self.cells_required data type = data[:type] || :ale cells_per_milliliter = case type when :ale then 750_000 when :hybrid then 1_125_000 when :lager then 1_500_000 end (cells_per_milliliter * (data[:volume] * 1000) * data[:extract]).round end |