Class: RubyAem::Response

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

Overview

Response wraps HTTP response data returned by swagger_aem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code, body, headers) ⇒ Object

Initialise a result.

Parameters:

  • status_code

    HTTP status code

  • body

    HTTP response body

  • headers

    HTTP headers



28
29
30
31
32
# File 'lib/ruby_aem/response.rb', line 28

def initialize(status_code, body, headers)
  @status_code = status_code
  @body = body
  @headers = headers
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body



19
20
21
# File 'lib/ruby_aem/response.rb', line 19

def body
  @body
end

#headersObject

Returns the value of attribute headers



20
21
22
# File 'lib/ruby_aem/response.rb', line 20

def headers
  @headers
end

#status_codeObject

Returns the value of attribute status_code



18
19
20
# File 'lib/ruby_aem/response.rb', line 18

def status_code
  @status_code
end