Class: ExchangeRate

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo_currency/exchange_rate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to, rate, timestamp) ⇒ ExchangeRate

Returns a new instance of ExchangeRate.



5
6
7
8
9
10
# File 'lib/yahoo_currency/exchange_rate.rb', line 5

def initialize(from, to, rate, timestamp)
  @from = from
  @to = to
  @rate = rate
  @timestamp = timestamp
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



3
4
5
# File 'lib/yahoo_currency/exchange_rate.rb', line 3

def from
  @from
end

#rateObject

Returns the value of attribute rate.



3
4
5
# File 'lib/yahoo_currency/exchange_rate.rb', line 3

def rate
  @rate
end

#timestampObject

Returns the value of attribute timestamp.



3
4
5
# File 'lib/yahoo_currency/exchange_rate.rb', line 3

def timestamp
  @timestamp
end

#toObject

Returns the value of attribute to.



3
4
5
# File 'lib/yahoo_currency/exchange_rate.rb', line 3

def to
  @to
end