Class: S3::GetResponse
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Attributes inherited from Response
Instance Method Summary collapse
-
#get_aws_metadata(response) ⇒ Object
parses the request headers and pulls out the s3 metadata into a hash.
-
#initialize(response) ⇒ GetResponse
constructor
A new instance of GetResponse.
Constructor Details
#initialize(response) ⇒ GetResponse
Returns a new instance of GetResponse.
656 657 658 659 660 661 |
# File 'lib/s3sync/S3.rb', line 656 def initialize(response) super(response) = (response) data = response.body @object = S3Object.new(data, ) end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
655 656 657 |
# File 'lib/s3sync/S3.rb', line 655 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
664 665 666 667 668 669 670 671 672 |
# File 'lib/s3sync/S3.rb', line 664 def (response) = {} response.each do |key, value| if key =~ /^#{METADATA_PREFIX}(.*)$/oi [$1] = value end end return end |