Class: Typhoeus::Response
- Inherits:
-
Object
- Object
- Typhoeus::Response
- Includes:
- Informations, Status
- Defined in:
- lib/typhoeus/response.rb,
lib/typhoeus/response/header.rb,
lib/typhoeus/response/status.rb,
lib/typhoeus/response/informations.rb
Overview
This class respresents the response.
Defined Under Namespace
Modules: Informations, Status Classes: Header
Instance Attribute Summary collapse
-
#mock ⇒ Object
private
Returns wether this request is mocked or not.
-
#options ⇒ Hash
The options provided, contains all the informations about the request.
-
#request ⇒ Typhoeus::Request
Remembers the corresponding request.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Response
constructor
Create a new response.
Methods included from Status
#http_version, #modified?, #status_message, #success?, #timed_out?
Methods included from Informations
#appconnect_time, #connect_time, #effective_url, #headers, #httpauth_avail, #namelookup_time, #pretransfer_time, #primary_ip, #redirect_count, #redirections, #response_body, #response_code, #response_headers, #return_code, #starttransfer_time, #total_time
Constructor Details
#initialize(options = {}) ⇒ Response
Create a new response.
40 41 42 43 |
# File 'lib/typhoeus/response.rb', line 40 def initialize( = {}) @options = @headers = [:headers] end |
Instance Attribute Details
#mock ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns wether this request is mocked or not.
49 50 51 |
# File 'lib/typhoeus/response.rb', line 49 def mock defined?(@mock) ? @mock : [:mock] end |
#options ⇒ Hash
The options provided, contains all the informations about the request.
27 28 29 |
# File 'lib/typhoeus/response.rb', line 27 def @options end |
#request ⇒ Typhoeus::Request
Remembers the corresponding request.
21 22 23 |
# File 'lib/typhoeus/response.rb', line 21 def request @request end |