Class: BeerXML::Yeast
Instance Method Summary
collapse
#as_json, json_create
#as_beerxml, #as_brewson, auto_migrate_down!, auto_migrate_up!, auto_upgrade!, default_repository_name
Instance Method Details
#cleanup ⇒ Object
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_amount ⇒ Object
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
|