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



31
32
33
34
35
# File 'lib/ruby_aem/response.rb', line 31

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.



22
23
24
# File 'lib/ruby_aem/response.rb', line 22

def body
  @body
end

#headersObject

Returns the value of attribute headers.



23
24
25
# File 'lib/ruby_aem/response.rb', line 23

def headers
  @headers
end

#status_codeObject

Returns the value of attribute status_code.



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

def status_code
  @status_code
end