Class: BeerXML::Hop

Inherits:
Brewser::Hop show all
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

#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



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