class SimpleTextReformatter::CurrencyFormatter
Public Class Methods
new(currency_string)
click to toggle source
# File lib/simple_text_reformatter/currency_formatter.rb, line 8 def initialize(currency_string) @currency_string = currency_string end
Public Instance Methods
reformat()
click to toggle source
# File lib/simple_text_reformatter/currency_formatter.rb, line 12 def reformat amount = @currency_string.to_f * 100 return Money.new(amount, 'USD').format end