Class: BeerXML::Hop
- Inherits:
-
Brewser::Hop
- Object
- Brewser::Model
- Brewser::Hop
- BeerXML::Hop
- Includes:
- ROXML
- Defined in:
- lib/brewser/engines/beerxml.rb
Overview
These models add the hooks to deserialize the data using ROXML
Brought in as a seperate model to allow multiple version of BeerXML
Instance Method Summary collapse
Methods inherited from Brewser::Hop
Methods inherited from Brewser::Model
#as_beerxml, #as_brewson, auto_migrate_down!, auto_migrate_up!, auto_upgrade!, default_repository_name
Instance Method Details
#cleanup ⇒ Object
81 82 83 84 |
# File 'lib/brewser/engines/beerxml.rb', line 81 def cleanup self.amount = display_amount.present? ? display_amount.u : "#{uncast_amount} kg".u self.time = display_time.present? ? display_time.u : "#{uncast_time} min".u end |