Class: ProMashRec::SimpleSchedule

Inherits:
Brewser::MashSchedule 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(mash) ⇒ Object



322
323
324
325
326
327
328
329
330
# File 'lib/brewser/engines/promash_rec.rb', line 322

def from_promash(mash)
  self.name = "Simple"
  ["acid_rest", "protein_rest", "int_rest", "sac_rest", "mash_out", "sparge"].each do |step, index|
    next if mash.send("#{step}_temp")==0
    self.mash_steps.push ProMashRec::MashStep.new.from_simple(index, "#{step.gsub("_"," ").capitalize}", "#{mash.send("#{step}_temp")} dF", 
      "#{mash.send("#{step}_time")} min")
  end
  return self
end