Class: RSpecAPITest::HTTPHelpers::JSONHashResponse

Inherits:
Hash
  • Object
show all
Defined in:
lib/rspec_api_test/http_helpers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, code, headers) ⇒ JSONHashResponse

Returns a new instance of JSONHashResponse.



16
17
18
19
20
# File 'lib/rspec_api_test/http_helpers.rb', line 16

def initialize(hash, code, headers)
  @code = code
  @headers = headers
  super(hash.with_indifferent_access)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



15
16
17
# File 'lib/rspec_api_test/http_helpers.rb', line 15

def code
  @code
end

#headersObject (readonly)

Returns the value of attribute headers.



15
16
17
# File 'lib/rspec_api_test/http_helpers.rb', line 15

def headers
  @headers
end