Class: CurrencyConversion::Currencies

Inherits:
Object
  • Object
show all
Defined in:
lib/currency-conversion/objects/currencies.rb

Overview

Currencies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Currencies

Returns a new instance of Currencies.



12
13
14
15
# File 'lib/currency-conversion/objects/currencies.rb', line 12

def initialize(response)
  @response = response
  @body = response.body
end

Instance Attribute Details

#bodyHash (readonly)

Returns The response body.

Returns:

  • (Hash)

    The response body



7
8
9
# File 'lib/currency-conversion/objects/currencies.rb', line 7

def body
  @body
end

#responseFaraday::Response (readonly)

Returns The Faraday Response.

Returns:

  • (Faraday::Response)

    The Faraday Response



10
11
12
# File 'lib/currency-conversion/objects/currencies.rb', line 10

def response
  @response
end

Instance Method Details

#dataObject



17
18
19
# File 'lib/currency-conversion/objects/currencies.rb', line 17

def data
  body['data']
end