Class: Solon::Money
- Inherits:
-
Object
- Object
- Solon::Money
- Defined in:
- lib/solon/money.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
Instance Method Summary collapse
-
#initialize(amount, currency) ⇒ Money
constructor
A new instance of Money.
Constructor Details
#initialize(amount, currency) ⇒ Money
Returns a new instance of Money.
3 4 5 6 |
# File 'lib/solon/money.rb', line 3 def initialize(amount, currency) @amount = amount.to_f @currency = currency end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
8 9 10 |
# File 'lib/solon/money.rb', line 8 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
8 9 10 |
# File 'lib/solon/money.rb', line 8 def currency @currency end |