Method: Beercalc.finalGravity

Defined in:
lib/beercalc.rb

.finalGravity(g, vol_beg, vol_end) ⇒ Object

FINAL GRAVITY

param g: number - initial gravity
param vol_beg: number - volume in gallons at the begining of the boil
param vol_end: number - volume in gallons at the end of the boil


156
157
158
159
160
161
162
# File 'lib/beercalc.rb', line 156

def self.finalGravity(g, vol_beg, vol_end)
  unless !g.is_a?(Numeric) || !vol_beg.is_a?(Numeric) || !vol_end.is_a?(Numeric)
    gu = self.totalGravity(g,vol_beg) / vol_end
  else
    gu = nil
  end
end