Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/money_attribute/core_ext.rb

Overview

:nodoc

Instance Method Summary collapse

Instance Method Details

#dollarsObject Also known as: dollar



9
10
11
# File 'lib/money_attribute/core_ext.rb', line 9

def dollars
  ::Mint.money(self, 'USD')
end

#eurosObject Also known as: euro



13
14
15
# File 'lib/money_attribute/core_ext.rb', line 13

def euros
  ::Mint.money(self, 'EUR')
end

#to_money(currency = MoneyAttribute.default_currency) ⇒ Object



5
6
7
# File 'lib/money_attribute/core_ext.rb', line 5

def to_money(currency = MoneyAttribute.default_currency)
  ::Mint.money(self, currency)
end