Class: ProMashRec::SimpleSchedule

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

Instance Method Summary collapse

Methods inherited from Brewser::MashSchedule

#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(mash) ⇒ Object



346
347
348
349
350
351
352
353
354
# File 'lib/brewser/engines/promash_rec.rb', line 346

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