Class: Horseman::Response
- Inherits:
-
Object
- Object
- Horseman::Response
- Defined in:
- lib/horseman/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(body, headers = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/horseman/response.rb', line 5 def body @body end |
#document ⇒ Object (readonly)
Returns the value of attribute document.
5 6 7 |
# File 'lib/horseman/response.rb', line 5 def document @document end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/horseman/response.rb', line 5 def headers @headers end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/horseman/response.rb', line 13 def[](key) @headers[key] end |