Class: AWS::S3::S3Object::Metadata
- Inherits:
-
Hash
- Object
- Hash
- AWS::S3::S3Object::Metadata
- Defined in:
- lib/aws/s3/object.rb
Overview
:nodoc:
Constant Summary collapse
- HEADER_PREFIX =
'x-amz-meta-'- SIZE_LIMIT =
2 kilobytes
2048
Instance Method Summary collapse
- #[](header) ⇒ Object
- #[]=(header, value) ⇒ Object
-
#initialize(headers) ⇒ Metadata
constructor
A new instance of Metadata.
- #to_headers ⇒ Object
Constructor Details
#initialize(headers) ⇒ Metadata
Returns a new instance of Metadata.
357 358 359 360 361 |
# File 'lib/aws/s3/object.rb', line 357 def initialize(headers) @headers = headers super() end |
Instance Method Details
#[](header) ⇒ Object
367 368 369 |
# File 'lib/aws/s3/object.rb', line 367 def [](header) super(header_name(header.to_header)) end |
#[]=(header, value) ⇒ Object
363 364 365 |
# File 'lib/aws/s3/object.rb', line 363 def []=(header, value) super(header_name(header.to_header), value) end |
#to_headers ⇒ Object
371 372 373 374 |
# File 'lib/aws/s3/object.rb', line 371 def to_headers validate! self end |