Method: Money#to_f

Defined in:
lib/money/money.rb

#to_fFloat

Return the amount of money as a float. Floating points cannot guarantee precision. Therefore, this function should only be used when you no longer need to represent currency or working with another system that requires floats.

Examples:

Money.us_dollar(100).to_f #=> 1.0

Returns:



473
474
475
# File 'lib/money/money.rb', line 473

def to_f
  to_d.to_f
end