Class: ProMashRec::Yeast

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

Instance Method Summary collapse

Methods inherited from Brewser::Yeast

#as_json, json_create

Methods inherited from Brewser::Model

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

Instance Method Details

#from_promash(y) ⇒ Object



288
289
290
291
292
293
294
295
296
297
298
# File 'lib/brewser/engines/promash_rec.rb', line 288

def from_promash(y)
  self.name = y.name.split("\x00")[0].strip
  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