Class: Rapa::Responses::BaseResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/rapa/responses/base_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(faraday_response) ⇒ BaseResponse

Returns a new instance of BaseResponse.

Parameters:

  • faraday_response (Faraday::Response)


5
6
7
# File 'lib/rapa/responses/base_response.rb', line 5

def initialize(faraday_response)
  @faraday_response = faraday_response
end

Instance Method Details

#bodyString

Returns:

  • (String)


10
11
12
# File 'lib/rapa/responses/base_response.rb', line 10

def body
  faraday_response.body
end

#headersFaraday::Utils::Headers

Returns:

  • (Faraday::Utils::Headers)


15
16
17
# File 'lib/rapa/responses/base_response.rb', line 15

def headers
  faraday_response.headers
end

#statusInteger

Returns:

  • (Integer)


20
21
22
# File 'lib/rapa/responses/base_response.rb', line 20

def status
  faraday_response.status
end