Class: Response

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

Overview

response.rb

~~~~~~~~~
This module implements the Response class.
:authors: Konstantin Bokarius.
:copyright: (c) 2015 by Fanout, Inc.
:license: MIT, see LICENSE for more details.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = nil, reason = nil, headers = nil, body = nil) ⇒ Response

Returns a new instance of Response.



14
15
16
17
18
19
# File 'lib/response.rb', line 14

def initialize(code=nil, reason=nil, headers=nil, body=nil)
  @code = code
  @reason = reason
  @headers = headers
  @body = body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



12
13
14
# File 'lib/response.rb', line 12

def body
  @body
end

#codeObject

Returns the value of attribute code.



9
10
11
# File 'lib/response.rb', line 9

def code
  @code
end

#headersObject

Returns the value of attribute headers.



11
12
13
# File 'lib/response.rb', line 11

def headers
  @headers
end

#reasonObject

Returns the value of attribute reason.



10
11
12
# File 'lib/response.rb', line 10

def reason
  @reason
end