Class: GoogleCurrencyExchange
- Inherits:
-
Object
- Object
- GoogleCurrencyExchange
- Includes:
- Base
- Defined in:
- lib/google_currency_exchange.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(amount, from, to) ⇒ GoogleCurrencyExchange
constructor
A new instance of GoogleCurrencyExchange.
- #process ⇒ Object
Methods included from Base
#call_google_finance, #extract_exchanged_amount
Constructor Details
#initialize(amount, from, to) ⇒ GoogleCurrencyExchange
Returns a new instance of GoogleCurrencyExchange.
10 11 12 13 14 |
# File 'lib/google_currency_exchange.rb', line 10 def initialize(amount, from, to) @amount = amount @from = from @to = to end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
8 9 10 |
# File 'lib/google_currency_exchange.rb', line 8 def amount @amount end |
#from ⇒ Object
Returns the value of attribute from.
8 9 10 |
# File 'lib/google_currency_exchange.rb', line 8 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
8 9 10 |
# File 'lib/google_currency_exchange.rb', line 8 def to @to end |
Instance Method Details
#process ⇒ Object
16 17 18 |
# File 'lib/google_currency_exchange.rb', line 16 def process call_google_finance(@amount, @from, @to) end |