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.



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

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

Instance Method Details

#[](header) ⇒ Object



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

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

#[]=(header, value) ⇒ Object



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

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

#to_headersObject



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

def to_headers
  validate!
  self
end