Class: Response
- Inherits:
-
Object
- Object
- Response
- Includes:
- Net::HTTPHeader
- Defined in:
- lib/mechanize/test_case.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
(also: #status)
Returns the value of attribute code.
-
#cookies ⇒ Object
Returns the value of attribute cookies.
-
#header ⇒ Object
Returns the value of attribute header.
-
#http_version ⇒ Object
Returns the value of attribute http_version.
-
#query ⇒ Object
Returns the value of attribute query.
-
#query_params ⇒ Object
Returns the value of attribute query_params.
Instance Method Summary collapse
-
#initialize ⇒ Response
constructor
A new instance of Response.
- #message ⇒ Object
- #read_body {|body| ... } ⇒ Object
Constructor Details
#initialize ⇒ Response
Returns a new instance of Response.
306 307 308 309 310 311 312 313 |
# File 'lib/mechanize/test_case.rb', line 306 def initialize @header = {} @body = String.new @code = nil @query = nil @cookies = [] @http_version = '1.1' end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
295 296 297 |
# File 'lib/mechanize/test_case.rb', line 295 def body @body end |
#code ⇒ Object Also known as: status
Returns the value of attribute code.
294 295 296 |
# File 'lib/mechanize/test_case.rb', line 294 def code @code end |
#cookies ⇒ Object
Returns the value of attribute cookies.
295 296 297 |
# File 'lib/mechanize/test_case.rb', line 295 def @cookies end |
#header ⇒ Object
Returns the value of attribute header.
297 298 299 |
# File 'lib/mechanize/test_case.rb', line 297 def header @header end |
#http_version ⇒ Object
Returns the value of attribute http_version.
296 297 298 |
# File 'lib/mechanize/test_case.rb', line 296 def http_version @http_version end |
#query ⇒ Object
Returns the value of attribute query.
295 296 297 |
# File 'lib/mechanize/test_case.rb', line 295 def query @query end |
#query_params ⇒ Object
Returns the value of attribute query_params.
296 297 298 |
# File 'lib/mechanize/test_case.rb', line 296 def query_params @query_params end |
Instance Method Details
#message ⇒ Object
319 320 321 |
# File 'lib/mechanize/test_case.rb', line 319 def '' end |
#read_body {|body| ... } ⇒ Object
315 316 317 |
# File 'lib/mechanize/test_case.rb', line 315 def read_body yield body end |