Class: Fog::Proxmox::Identity::Roles

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

Overview

class Roles model collection authentication

Instance Method Summary collapse

Instance Method Details

#allObject



29
30
31
# File 'lib/fog/identity/proxmox/models/roles.rb', line 29

def all
  load service.list_roles
end

#destroy(id) ⇒ Object



37
38
39
40
# File 'lib/fog/identity/proxmox/models/roles.rb', line 37

def destroy(id)
  role = get(id)
  role.destroy
end

#get(id) ⇒ Object



33
34
35
# File 'lib/fog/identity/proxmox/models/roles.rb', line 33

def get(id)
  all.find { |role| role.identity === id }
end