Class: Elevate::HTTP::HTTPResponse
- Inherits:
-
Object
- Object
- Elevate::HTTP::HTTPResponse
- Defined in:
- lib/elevate/http/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error ⇒ Object
Returns the value of attribute error.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Instance Method Summary collapse
- #append_data(data) ⇒ Object
-
#initialize ⇒ HTTPResponse
constructor
A new instance of HTTPResponse.
Constructor Details
#initialize ⇒ HTTPResponse
4 5 6 7 8 9 |
# File 'lib/elevate/http/response.rb', line 4 def initialize @body = nil @headers = nil @status_code = nil @error = nil end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
16 17 18 |
# File 'lib/elevate/http/response.rb', line 16 def body @body end |
#error ⇒ Object
Returns the value of attribute error.
19 20 21 |
# File 'lib/elevate/http/response.rb', line 19 def error @error end |
#headers ⇒ Object
Returns the value of attribute headers.
17 18 19 |
# File 'lib/elevate/http/response.rb', line 17 def headers @headers end |
#status_code ⇒ Object
Returns the value of attribute status_code.
18 19 20 |
# File 'lib/elevate/http/response.rb', line 18 def status_code @status_code end |
Instance Method Details
#append_data(data) ⇒ Object
11 12 13 14 |
# File 'lib/elevate/http/response.rb', line 11 def append_data(data) @body ||= NSMutableData.alloc.init @body.appendData(data) end |