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.



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

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

Instance Method Details

#[](header) ⇒ Object



374
375
376
# File 'lib/aws/s3/object.rb', line 374

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

#[]=(header, value) ⇒ Object



370
371
372
# File 'lib/aws/s3/object.rb', line 370

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

#to_headersObject



378
379
380
381
# File 'lib/aws/s3/object.rb', line 378

def to_headers
  validate!
  self
end