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

better naming of local vars

This commit is contained in:
Rodrigo Estebanez 2013-07-09 15:00:40 +02:00
parent 25addd8029
commit 8947cf5a6f

View file

@ -12,19 +12,20 @@ module Fog
private
def get_by_id(item_id)
catalog = service.get_catalog(item_id).body
%w(:CatalogItems :Link).each {|key_to_delete| catalog.delete(key_to_delete) }
service.add_id_from_href!(catalog)
catalog
item = service.get_catalog(item_id).body
%w(:CatalogItems :Link).each {|key_to_delete| item.delete(key_to_delete) }
service.add_id_from_href!(item)
item
end
def item_list
data = service.get_organization(organization.id).body
catalogs = data[:Link].select { |link| link[:type] == "application/vnd.vmware.vcloud.catalog+xml" }
catalogs.each{|catalog| service.add_id_from_href!(catalog) }
catalogs
items = data[:Link].select { |link| link[:type] == "application/vnd.vmware.vcloud.catalog+xml" }
items.each{|item| service.add_id_from_href!(item) }
items
end
end