Class: Fog::Rackspace::Identity::Roles

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/identity/roles.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#userObject

Returns the value of attribute user.



10
11
12
# File 'lib/fog/rackspace/models/identity/roles.rb', line 10

def user
  @user
end

Instance Method Details

#allObject



12
13
14
15
# File 'lib/fog/rackspace/models/identity/roles.rb', line 12

def all
  requires :user
  load(retrieve_roles)
end

#get(id) ⇒ Object



17
18
19
20
21
# File 'lib/fog/rackspace/models/identity/roles.rb', line 17

def get(id)
  requires :user
  data = retrieve_roles.find{ |role| role['id'] == id }
  data && new(data)
end