Class: Rack::ClientSpec::GotRequest::Response
- Inherits:
-
Object
- Object
- Rack::ClientSpec::GotRequest::Response
- Defined in:
- lib/rack/client_spec/got_request.rb
Instance Method Summary collapse
- #[](i) ⇒ Object
- #body ⇒ Object
- #headers ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #inspect ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
8 9 10 |
# File 'lib/rack/client_spec/got_request.rb', line 8 def initialize(response) @response = response end |
Instance Method Details
#[](i) ⇒ Object
20 21 22 |
# File 'lib/rack/client_spec/got_request.rb', line 20 def [](i) @response[i] end |
#body ⇒ Object
17 18 19 |
# File 'lib/rack/client_spec/got_request.rb', line 17 def body @response[2] end |
#headers ⇒ Object
14 15 16 |
# File 'lib/rack/client_spec/got_request.rb', line 14 def headers @response[1] end |
#inspect ⇒ Object
5 6 7 |
# File 'lib/rack/client_spec/got_request.rb', line 5 def inspect "#<Response>" end |
#status ⇒ Object
11 12 13 |
# File 'lib/rack/client_spec/got_request.rb', line 11 def status @response[0] end |