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:
parent
3290651fb0
commit
0026043f8c
1 changed files with 3 additions and 4 deletions
|
@ -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|
|
||||||
|
|
Loading…
Reference in a new issue