lib/conversions/unit.rb in seamusabshere-conversions-1.4.0 vs lib/conversions/unit.rb in seamusabshere-conversions-1.4.1

- old
+ new

@@ -7,9 +7,17 @@ # * _from_: The unit to convert from (ie. :miles) def initialize(value, from) @value = value @from = from end + + def to_i + @value.to_i + end + + def to_f + @value.to_f + end # Convert to a certain other unit. # # * _to_: The unit to convert to (ie. :kilometers) # * _options_: