Class: Convertable::Units::SquareMeter
- Inherits:
-
SimpleUnit
- Object
- SimpleUnit
- Convertable::Units::SquareMeter
- Defined in:
- lib/convertable/units.rb
Class Method Summary collapse
Methods inherited from SimpleUnit
Class Method Details
.convert_to(magnitude, new_unit) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/convertable/units.rb', line 36 def self.convert_to(magnitude, new_unit) if new_unit == SquareMeter magnitude elsif new_unit == SquareFoot magnitude * 10.7639 else raise UnsupportedConversion end end |