Class: Convertable::Units::Currency

Inherits:
SimpleUnit show all
Defined in:
lib/convertable/units.rb

Direct Known Subclasses

Gbp, Usd

Class Method Summary collapse

Methods inherited from SimpleUnit

to_json

Class Method Details

.convert_to(magnitude, new_unit) ⇒ Object



72
73
74
75
76
77
78
# File 'lib/convertable/units.rb', line 72

def self.convert_to(magnitude, new_unit)
  if new_unit == self
    magnitude
  else
    raise UnsupportedConversion
  end
end