class VCR::ResponseStatus
The response status of an {HTTPInteraction}.
@attr [Integer] code the HTTP status code @attr [String] message the HTTP status message (e.g. “OK” for a status of 200)
Public Class Methods
Source
# File lib/vcr/structs.rb, line 458 def self.from_hash(hash) new hash['code'], hash['message'] end
Constructs a new instance from a hash.
@param [Hash] hash the hash to use to construct the instance. @return [ResponseStatus] the response status
Public Instance Methods
Source
# File lib/vcr/structs.rb, line 448 def to_hash { 'code' => code, 'message' => message }.tap { |h| OrderedHashSerializer.apply_to(h, members) } end
@return [Hash] hash that represents this response status
and can be easily serialized.