Module: MuckCommerce::CurrencyMethods
- Defined in:
- lib/muck-commerce/share/currency_methods.rb
Instance Method Summary collapse
-
#amount_dollars ⇒ Object
Assumes a field named amount.
-
#amount_dollars=(val) ⇒ Object
Assumes a field named amount.
-
#amount_price ⇒ Object
Assumes a field named amount Get the order amount as a formatted currency instead of as cents.
Instance Method Details
#amount_dollars ⇒ Object
Assumes a field named amount
10 11 12 |
# File 'lib/muck-commerce/share/currency_methods.rb', line 10 def amount_dollars cents_to_dollars(self.amount) end |
#amount_dollars=(val) ⇒ Object
Assumes a field named amount
5 6 7 |
# File 'lib/muck-commerce/share/currency_methods.rb', line 5 def amount_dollars= val self.amount = dollars_to_cents(val) end |
#amount_price ⇒ Object
Assumes a field named amount Get the order amount as a formatted currency instead of as cents.
16 17 18 |
# File 'lib/muck-commerce/share/currency_methods.rb', line 16 def amount_price format_currency(self.amount) end |