Class: S3::GetResponse

Inherits:
Response show all
Defined in:
lib/S3.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#http_response

Instance Method Summary collapse

Methods inherited from Response

#message

Constructor Details

#initialize(response) ⇒ GetResponse

Returns a new instance of GetResponse.



799
800
801
802
803
804
# File 'lib/S3.rb', line 799

def initialize(response)
  super(response)
   = (response)
  data = response.body
  @object = S3Object.new(data, )
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



798
799
800
# File 'lib/S3.rb', line 798

def object
  @object
end

Instance Method Details

#get_aws_metadata(response) ⇒ Object

parses the request headers and pulls out the s3 metadata into a hash



807
808
809
810
811
812
813
814
815
# File 'lib/S3.rb', line 807

def (response)
   = {}
  response.each do |key, value|
    if key =~ /^#{METADATA_PREFIX}(.*)$/oi
      [$1] = value
    end
  end
  return 
end