Class: SdbDal::S3::GetResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/sdb_dal/s3.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#http_response

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ GetResponse

Returns a new instance of GetResponse.



542
543
544
545
546
547
# File 'lib/sdb_dal/s3.rb', line 542

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.



541
542
543
# File 'lib/sdb_dal/s3.rb', line 541

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



550
551
552
553
554
555
556
557
558
# File 'lib/sdb_dal/s3.rb', line 550

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