Class: Typhoeus::Response

Inherits:
Object show all
Defined in:
lib/typhoeus/response_marshalling.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._load(string) ⇒ Object



19
20
21
22
# File 'lib/typhoeus/response_marshalling.rb', line 19

def self._load(string)
  options = YAML.load(string)
  Typhoeus::Response.new(options)
end

Instance Method Details

#_dump(depth) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/typhoeus/response_marshalling.rb', line 5

def _dump(depth)
  fields = {
    :code => @code,
    :headers => @headers,
    :body => @body,
    :time => @time,
    :requested_url => @requested_url,
    :requested_http_method => @requested_http_method,
    :start_time => @start_time
  }

  YAML.dump(fields)
end