Class: Fog::Compute::Azure::StorageAccounts

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/azure/models/compute/storage_accounts.rb

Instance Method Summary collapse

Instance Method Details

#allObject



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/fog/azure/models/compute/storage_accounts.rb', line 31

def all()
  accounts = []
  service.list_storage_accounts.each do ||
    hash = {}
    .instance_variables.each do |var|
      hash[var.to_s.delete("@")] = .instance_variable_get(var)
    end
    accounts << hash
  end
  load(accounts)
end

#get(identity) ⇒ Object



43
44
45
46
47
# File 'lib/fog/azure/models/compute/storage_accounts.rb', line 43

def get(identity)
  all.find { |f| f.name == identity }
rescue Fog::Errors::NotFound
  nil
end