Class: FXRates::Response::Timeseries
- Inherits:
-
Object
- Object
- FXRates::Response::Timeseries
- Defined in:
- lib/fx_rates/response/timeseries.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#rates ⇒ Object
readonly
Returns the value of attribute rates.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(response) ⇒ Timeseries
constructor
A new instance of Timeseries.
Constructor Details
#initialize(response) ⇒ Timeseries
Returns a new instance of Timeseries.
5 6 7 8 9 10 11 12 |
# File 'lib/fx_rates/response/timeseries.rb', line 5 def initialize(response) @success = response["success"] @rates = response["rates"] @start_date = response["start_date"] @end_date = response["end_date"] @base = response["base"] @raw_response = response end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
3 4 5 |
# File 'lib/fx_rates/response/timeseries.rb', line 3 def base @base end |
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/fx_rates/response/timeseries.rb', line 3 def end_date @end_date end |
#rates ⇒ Object (readonly)
Returns the value of attribute rates.
3 4 5 |
# File 'lib/fx_rates/response/timeseries.rb', line 3 def rates @rates end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
3 4 5 |
# File 'lib/fx_rates/response/timeseries.rb', line 3 def raw_response @raw_response end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/fx_rates/response/timeseries.rb', line 3 def start_date @start_date end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
3 4 5 |
# File 'lib/fx_rates/response/timeseries.rb', line 3 def success @success end |