Class: Raca::Users
- Inherits:
-
Object
- Object
- Raca::Users
- 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
- #get(username) ⇒ Object
-
#initialize(account, opts = {}) ⇒ Users
constructor
A new instance of Users.
- #inspect ⇒ Object
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(account, opts = {}) @account = 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 |
#inspect ⇒ Object
19 20 21 |
# File 'lib/raca/users.rb', line 19 def inspect "#<Raca::Users:#{__id__}>" end |