Class: FXRates::Response::Rates

Inherits:
Object
  • Object
show all
Defined in:
lib/fx_rates/response/rates.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Rates

Returns a new instance of Rates.



5
6
7
8
9
10
11
12
# File 'lib/fx_rates/response/rates.rb', line 5

def initialize(response)
  @success = response["success"]
  @rates = response["rates"]
  @timestamp = response["timestamp"]
  @date = response["date"]
  @base = response["base"]
  @raw_response = response
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



3
4
5
# File 'lib/fx_rates/response/rates.rb', line 3

def base
  @base
end

#dateObject (readonly)

Returns the value of attribute date.



3
4
5
# File 'lib/fx_rates/response/rates.rb', line 3

def date
  @date
end

#ratesObject (readonly)

Returns the value of attribute rates.



3
4
5
# File 'lib/fx_rates/response/rates.rb', line 3

def rates
  @rates
end

#raw_responseObject (readonly)

Returns the value of attribute raw_response.



3
4
5
# File 'lib/fx_rates/response/rates.rb', line 3

def raw_response
  @raw_response
end

#successObject (readonly)

Returns the value of attribute success.



3
4
5
# File 'lib/fx_rates/response/rates.rb', line 3

def success
  @success
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



3
4
5
# File 'lib/fx_rates/response/rates.rb', line 3

def timestamp
  @timestamp
end