Class: Brewser::FermentationSchedule
- Defined in:
- lib/brewser/model/fermentation_schedule.rb
Direct Known Subclasses
BeerXML::FermentationSchedule, ProMashRec::FermentationSchedule, ProMashTxt::FermentationSchedule
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Model
#as_beerxml, #as_brewson, auto_migrate_down!, auto_migrate_up!, auto_upgrade!, default_repository_name
Class Method Details
.json_create(o) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/brewser/model/fermentation_schedule.rb', line 7 def self.json_create(o) a = self.new o['fermentation_steps'].each do |step| a.fermentation_steps.push step end unless o['fermentation_steps'].nil? return a end |
Instance Method Details
#as_json(options = {}) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/brewser/model/fermentation_schedule.rb', line 16 def as_json(={}) { JSON.create_id => "Brewser::FermentationSchedule", 'fermentation_steps' => fermentation_steps.to_a } end |