lib/fog/azurerm/models/resources/resource_groups.rb in fog-azure-rm-0.0.1 vs lib/fog/azurerm/models/resources/resource_groups.rb in fog-azure-rm-0.0.2
- old
+ new
@@ -6,18 +6,10 @@
class AzureRM
class ResourceGroups < Fog::Collection
model Fog::Resources::AzureRM::ResourceGroup
def all
- resource_groups = []
- service.list_resource_groups.each do |rg|
- hash = {}
- rg.instance_variables.each do |var|
- hash[var.to_s.delete('@')] = rg.instance_variable_get(var)
- end
- resource_groups << hash
- end
- load(resource_groups)
+ load(service.list_resource_groups)
end
def get(identity)
all.find { |f| f.name == identity }
end