Class: VCR::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/vcr/structs.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body



21
22
23
# File 'lib/vcr/structs.rb', line 21

def body
  @body
end

#headersObject

Returns the value of attribute headers



21
22
23
# File 'lib/vcr/structs.rb', line 21

def headers
  @headers
end

#http_versionObject

Returns the value of attribute http_version



21
22
23
# File 'lib/vcr/structs.rb', line 21

def http_version
  @http_version
end

#statusObject

Returns the value of attribute status



21
22
23
# File 'lib/vcr/structs.rb', line 21

def status
  @status
end

Class Method Details

.from_net_http_response(response) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/vcr/structs.rb', line 22

def self.from_net_http_response(response)
  new(
    ResponseStatus.from_net_http_response(response),
    response.to_hash,
    response.body,
    response.http_version
  )
end