Class Fog::Storage::Rackspace::Metadata
In: lib/fog/rackspace/models/storage/metadata.rb
Parent: Object

Methods

[]   []=   delete   from_headers   method_missing   new   respond_to?   to_headers  

Constants

OBJECT_META_PREFIX = "X-Object-Meta-"
OBJECT_REMOVE_META_PREFIX = "X-Remove-Object-Meta-"
CONTAINER_META_PREFIX = "X-Container-Meta-"
CONTAINER_REMOVE_META_PREFIX = "X-Remove-Container-Meta-"
DUMMY_VALUE = 1   Cloud Files will ignore headers without a value
CONTAINER_KEY_REGEX = /^#{CONTAINER_META_PREFIX}(.*)/
OBJECT_KEY_REGEX = /^#{OBJECT_META_PREFIX}(.*)/

Attributes

data  [R]  @!attribute [rw] data @return [Hash] underlying data store for metadata class
parent  [R]  @!attribute [rw] parent @return [Fog::Storage::Rackspace::Directory,Fog::Storage::Rackspace::File] the parent object of the metadata

Public Class methods

Creates metadata object from Cloud File Headers @param [Fog::Storage::Rackspace::Directory,Fog::Storage::Rackspace::File] parent object of the metadata @param [Hash] headers Cloud File headers

Initialize @param [Fog::Storage::Rackspace::Directory,Fog::Storage::Rackspace::File] parent object of the metadata @param [Hash] hash containing initial metadata values

Public Instance methods

Retrieve specific value for key from Metadata.

  • If key is of type String, this method will return the value of the metadatum

@param [key] key @return [value]

Set value for key.

  • If key is of type String, this method will set/add the value to Metadata

@param [key] key @return [String]

Delete key value pair from metadata @param [String] key to be deleted @return [Object] returns value for key @note Metadata must be deleted using this method in order to properly remove it from Cloud Files

Invoked by Ruby when obj is sent a message it cannot handle.

Returns true if method is implemented by Metadata class @param [Symbol] method_sym @param [Boolean] include_private

Returns metadata in a format expected by Cloud Files @return [Hash] Metadata in a format expected by Cloud Files

[Validate]