Class: AWS::S3::S3Object::Metadata

Inherits:
Hash
  • Object
show all
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

Constructor Details

#initialize(headers) ⇒ Metadata

Returns a new instance of Metadata.



353
354
355
356
357
# File 'lib/aws/s3/object.rb', line 353

def initialize(headers)
  @headers = headers
  super()
  extract_metadata!
end

Instance Method Details

#[](header) ⇒ Object



363
364
365
# File 'lib/aws/s3/object.rb', line 363

def [](header)
  super(header_name(header.to_header))
end

#[]=(header, value) ⇒ Object



359
360
361
# File 'lib/aws/s3/object.rb', line 359

def []=(header, value)
  super(header_name(header.to_header), value)
end

#to_headersObject



367
368
369
370
# File 'lib/aws/s3/object.rb', line 367

def to_headers
  validate!
  self
end