Class: Raca::Users

Inherits:
Object
  • Object
show all
Defined in:
lib/raca/users.rb

Overview

Represents a collection of users associated with a rackspace account

You probably don’t want to instantiate this directly, see Raca::Account#users

Instance Method Summary collapse

Constructor Details

#initialize(account, opts = {}) ⇒ Users

Returns a new instance of Users.



8
9
10
11
12
13
# File 'lib/raca/users.rb', line 8

def initialize(, opts = {})
  @account = 
  @identity_url = @account.public_endpoint("identity")
  @logger = opts[:logger]
  @logger ||= Rails.logger if defined?(Rails)
end

Instance Method Details

#get(username) ⇒ Object



15
16
17
# File 'lib/raca/users.rb', line 15

def get(username)
  list.detect { |user| user.username == username }
end

#inspectObject



19
20
21
# File 'lib/raca/users.rb', line 19

def inspect
  "#<Raca::Users:#{__id__}>"
end