# File lib/openstack/swift/container.rb, line 20 def container_metadata path = "/#{URI.encode(@name.to_s)}" response = @swift.connection.req("HEAD", path) resphash = response.to_hash meta = {:bytes=>resphash["x-container-bytes-used"][0], :count=>resphash["x-container-object-count"][0], :metadata=>{}} resphash.inject({}){|res, (k,v)| meta[:metadata].merge!({ k.gsub("x-container-meta-", "") => v.first }) if k.match(/^x-container-meta-/)} meta end