Sha256: 7481243617bd61e79ff6d03b168d2365af1fb980c3b853bb574116a70273293e

Contents?: true

Size: 517 Bytes

Versions: 7

Compression:

Stored size: 517 Bytes

Contents

require "fog/core/collection"
require "fog/brightbox/models/compute/api_client"

module Fog
  module Compute
    class Brightbox
      class ApiClients < Fog::Collection
        model Fog::Compute::Brightbox::ApiClient

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

        def get(identifier = nil)
          data = connection.get_api_client(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/api_clients.rb
fog-nirvanix-1.8.1 lib/fog/brightbox/models/compute/api_clients.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/brightbox/models/compute/api_clients.rb
fog-sgonyea-1.8.1 lib/fog/brightbox/models/compute/api_clients.rb
fog-1.8.0 lib/fog/brightbox/models/compute/api_clients.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/brightbox/models/compute/api_clients.rb
fog-1.7.0 lib/fog/brightbox/models/compute/api_clients.rb