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

Methods inherited from Hash

#to_normalized_options, #to_normalized_options!, #to_query_string

Constructor Details

#initialize(headers) ⇒ Metadata

Returns a new instance of Metadata.



307
308
309
310
311
# File 'lib/aws/s3/object.rb', line 307

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

Instance Method Details

#[](header) ⇒ Object



317
318
319
# File 'lib/aws/s3/object.rb', line 317

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

#[]=(header, value) ⇒ Object



313
314
315
# File 'lib/aws/s3/object.rb', line 313

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

#to_headersObject



321
322
323
324
# File 'lib/aws/s3/object.rb', line 321

def to_headers
  validate!
  self
end