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

[openstack|compute] rename meta_hash to to_hash; make it public

This commit is contained in:
Ben Bleything 2013-01-29 14:22:02 -08:00
parent 3290651fb0
commit 0026043f8c

View file

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