Class: Fog::Rackspace::Identity::Credentials

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/identity/credentials.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/credentials.rb', line 10

def user
  @user
end

Instance Method Details

#allObject



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

def all
  requires :user
  load(retrieve_credentials)
end

#get(id) ⇒ Object



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

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