Class: Beerxml::Properties::Weight

Inherits:
Property
  • Object
show all
Defined in:
lib/beerxml/properties.rb

Overview

Represents a weight. Default scale is kilograms, since that’s what BeerXML uses. But can handle conversion/display of other units.

Direct Known Subclasses

DisplayWeight

Instance Method Summary collapse

Methods inherited from Property

#custom?, #dump, #load, #primitive?, #typecast_to_primitive

Instance Method Details

#base_unitObject



41
42
43
# File 'lib/beerxml/properties.rb', line 41

def base_unit
  'kilograms'
end

#unit_typeObject



38
39
40
# File 'lib/beerxml/properties.rb', line 38

def unit_type
  'weight'
end