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

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



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

def all(options = {})
  data = service.list_accounts(options)
  load(data)
end

#get(identifier) ⇒ Object



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

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