Class: Tannenbaum::ExchangeRate
- Inherits:
-
Struct
- Object
- Struct
- Tannenbaum::ExchangeRate
- Defined in:
- lib/tannenbaum/quote.rb
Instance Attribute Summary collapse
-
#buy ⇒ Object
Returns the value of attribute buy.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#sell ⇒ Object
Returns the value of attribute sell.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(hash) ⇒ ExchangeRate
constructor
A new instance of ExchangeRate.
Constructor Details
#initialize(hash) ⇒ ExchangeRate
Returns a new instance of ExchangeRate.
35 36 37 |
# File 'lib/tannenbaum/quote.rb', line 35 def initialize(hash) super(*hash.values_at(:sell, :buy, :timestamp, :provider)) end |
Instance Attribute Details
#buy ⇒ Object
Returns the value of attribute buy
34 35 36 |
# File 'lib/tannenbaum/quote.rb', line 34 def buy @buy end |
#provider ⇒ Object
Returns the value of attribute provider
34 35 36 |
# File 'lib/tannenbaum/quote.rb', line 34 def provider @provider end |
#sell ⇒ Object
Returns the value of attribute sell
34 35 36 |
# File 'lib/tannenbaum/quote.rb', line 34 def sell @sell end |
#timestamp ⇒ Object
Returns the value of attribute timestamp
34 35 36 |
# File 'lib/tannenbaum/quote.rb', line 34 def end |