Method: CloudFiles::StorageObject#metadata
- Defined in:
- lib/cloudfiles/storage_object.rb
#metadata ⇒ Object
Returns the object’s metadata as a nicely formatted hash, stripping off the X-Meta-Object- prefix that the system prepends to the key name.
object.metadata
=> {"ruby"=>"cool", "foo"=>"bar"}
108 109 110 111 112 |
# File 'lib/cloudfiles/storage_object.rb', line 108 def = {} @metadata.each{|key, value| [key.gsub(/x-object-meta-/,'').gsub(/\+\-/, ' ')] = URI.decode(value).gsub(/\+\-/, ' ')} end |