Sha256: f913c14a8e70c2b3eecf001a7edcd1b14ac4aca76e38a20611f9c880282cd1c9

Contents?: true

Size: 561 Bytes

Versions: 7

Compression:

Stored size: 561 Bytes

Contents

require 'fog/core/collection'
require 'fog/brightbox/models/compute/account'

module Fog
  module Compute
    class Brightbox

      class Accounts < Fog::Collection

        model Fog::Compute::Brightbox::Account

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

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

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 5 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/brightbox/models/compute/accounts.rb
fog-nirvanix-1.8.1 lib/fog/brightbox/models/compute/accounts.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/brightbox/models/compute/accounts.rb
fog-sgonyea-1.8.1 lib/fog/brightbox/models/compute/accounts.rb
fog-1.8.0 lib/fog/brightbox/models/compute/accounts.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/brightbox/models/compute/accounts.rb
fog-1.7.0 lib/fog/brightbox/models/compute/accounts.rb