Class: BeerXML::Yeast

Inherits:
Brewser::Yeast show all
Includes:
ROXML
Defined in:
lib/brewser/engines/beerxml.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

#cleanupObject



202
203
204
205
206
# File 'lib/brewser/engines/beerxml.rb', line 202

def cleanup
  self.amount = set_amount
  self.min_temperature = disp_min_temp.present? ? disp_min_temp.u : "#{uncast_min_temperature} dC".u
  self.max_temperature = disp_max_temp.present? ? disp_max_temp.u : "#{uncast_max_temperature} dC".u
end

#set_amountObject



196
197
198
199
200
# File 'lib/brewser/engines/beerxml.rb', line 196

def set_amount
  return display_amount.u unless display_amount.blank?
  units = weight? ? "kg" : "l"
  return "#{amount_scalar} #{units}".u
end