Class: Brewser::Model::Units::Weight

Inherits:
Units
  • Object
show all
Defined in:
lib/brewser/model/units.rb

Overview

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

Instance Method Summary collapse

Methods inherited from Units

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

Instance Method Details

#base_unitObject



51
52
53
# File 'lib/brewser/model/units.rb', line 51

def base_unit
  'kg'
end

#kind_ofObject



48
49
50
# File 'lib/brewser/model/units.rb', line 48

def kind_of
  :mass
end