1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #1528 from bleything/metadata_to_hash

[openstack|compute] rename meta_hash to to_hash; make it public
This commit is contained in:
Dan Prince 2013-01-30 10:58:32 -08:00
commit 8cbe0ffe09

View file

@ -34,12 +34,12 @@ module Fog
def update(data=nil)
requires :parent
service.update_metadata(collection_name, @parent.id, meta_hash(data))
service.update_metadata(collection_name, @parent.id, to_hash(data))
end
def set(data=nil)
requires :parent
service.set_metadata(collection_name, @parent.id, meta_hash(data))
service.set_metadata(collection_name, @parent.id, to_hash(data))
end
def new(attributes = {})
@ -47,8 +47,7 @@ module Fog
super({ :parent => @parent }.merge!(attributes))
end
private
def meta_hash(data=nil)
def to_hash(data=nil)
if data.nil?
data={}
self.each do |meta|