Class: Solon::Money

Inherits:
Object
  • Object
show all
Defined in:
lib/solon/money.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject

Returns the value of attribute amount.



8
9
10
# File 'lib/solon/money.rb', line 8

def amount
  @amount
end

#currencyObject

Returns the value of attribute currency.



8
9
10
# File 'lib/solon/money.rb', line 8

def currency
  @currency
end