Class: ProMashRec::Yeast

Inherits:
Brewser::Yeast show all
Defined in:
lib/brewser/engines/promash_rec.rb

Instance Method Summary collapse

Methods inherited from Brewser::Model

#as_beerxml, #as_brewson, auto_migrate_down!, auto_migrate_up!, auto_upgrade!, #deep_json, default_repository_name, #to_json

Instance Method Details

#from_promash(y) ⇒ Object



284
285
286
287
288
289
290
291
292
293
294
# File 'lib/brewser/engines/promash_rec.rb', line 284

def from_promash(y)
  self.name = y.name.split("\x00")[0]
  self.supplier = y.supplier
  self.catalog = y.catalog
  self.attenuation = (y.aa_high + y.aa_low)/2
  self.min_temperature = self.max_temperature = "#{y.optimum_temp} dF".u
  self.description = y.comment
  self.amount = "1 each".u
  
  return self
end