Class: Tannenbaum::ExchangeRate

Inherits:
Struct
  • Object
show all
Defined in:
lib/tannenbaum/quote.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#buyObject

Returns the value of attribute buy

Returns:

  • (Object)

    the current value of buy



34
35
36
# File 'lib/tannenbaum/quote.rb', line 34

def buy
  @buy
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



34
35
36
# File 'lib/tannenbaum/quote.rb', line 34

def provider
  @provider
end

#sellObject

Returns the value of attribute sell

Returns:

  • (Object)

    the current value of sell



34
35
36
# File 'lib/tannenbaum/quote.rb', line 34

def sell
  @sell
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



34
35
36
# File 'lib/tannenbaum/quote.rb', line 34

def timestamp
  @timestamp
end