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.
=> {"ruby"=>"cool", "foo"=>"bar"}
134 135 136 137 138 |
# File 'lib/cloudfiles/storage_object.rb', line 134 def = {} self.[:metadata].each{ |key, value| [key.gsub(/x-object-meta-/, '').gsub(/\+\-/, ' ')] = URI.decode(value).gsub(/\+\-/, ' ') } end |