Method: Money#to_f
- Defined in:
- lib/money/money.rb
#to_f ⇒ Float
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.
473 474 475 |
# File 'lib/money/money.rb', line 473 def to_f to_d.to_f end |