Sha256: b36acfddd08a1bfe10dbedafd089db0d15a7d097d4132c6f77edce92467ce30d

Contents?: true

Size: 546 Bytes

Versions: 7

Compression:

Stored size: 546 Bytes

Contents

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

module Fog
  module Compute
    class Brightbox

      class Users < Fog::Collection

        model Fog::Compute::Brightbox::User

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

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

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/brightbox/users.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/brightbox/users.rb
fog-0.11.0 lib/fog/compute/models/brightbox/users.rb
fog-0.10.0 lib/fog/compute/models/brightbox/users.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/brightbox/users.rb
fog4encbs-0.9.0 lib/fog/compute/models/brightbox/users.rb
fog-0.9.0 lib/fog/compute/models/brightbox/users.rb