Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/monetize/core_extensions/string.rb

Instance Method Summary collapse

Instance Method Details

#to_currencyObject



8
9
10
# File 'lib/monetize/core_extensions/string.rb', line 8

def to_currency
  Money::Currency.new(self)
end

#to_money(currency = nil) ⇒ Object



4
5
6
# File 'lib/monetize/core_extensions/string.rb', line 4

def to_money(currency = nil)
  Monetize.parse!(self, currency)
end