Class: Brewser::Model::Units::WeightOrVolume

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

Instance Method Summary collapse

Methods inherited from Units

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

Instance Method Details

#base_unitObject



76
77
# File 'lib/brewser/model/units.rb', line 76

def base_unit
end

#kind_ofObject



68
69
70
# File 'lib/brewser/model/units.rb', line 68

def kind_of
  nil
end

#valid_kind?(value) ⇒ Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/brewser/model/units.rb', line 72

def valid_kind?(value)
  value.kind == :mass || value.kind == :volume
end