Class: RegistryApiClient::HTTP::Response

Inherits:
String
  • Object
show all
Defined in:
lib/docker_cake/registry_api_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_response) ⇒ Response

Returns a new instance of Response.



477
478
479
480
481
482
483
484
# File 'lib/docker_cake/registry_api_client.rb', line 477

def initialize(http_response)
  @http_response = http_response
  @headers = {}
  @http_response.to_hash.each do |key, value|
    @headers[key.gsub('-', '_').to_sym] = value.last
  end
  super(http_response.body)
end

Instance Attribute Details

#headersObject

Returns the value of attribute headers.



475
476
477
# File 'lib/docker_cake/registry_api_client.rb', line 475

def headers
  @headers
end