Class: Fog::Compute::Brightbox::Accounts

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

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/brightbox/models/compute/accounts.rb', line 10

def all
  data = service.list_accounts
  load(data)
end

#get(identifier) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/fog/brightbox/models/compute/accounts.rb', line 15

def get(identifier)
  return nil if identifier.nil? || identifier == ""
  data = service.(identifier)
  new(data)
rescue Excon::Errors::NotFound
  nil
end