class Keystone::V2_0::Manager::Role

Public Class Methods

new(auth_url) click to toggle source
Calls superclass method Keystone::V2_0::Manager::Base::new
# File lib/keystone/v2_0/manager/role.rb, line 10
def initialize(auth_url)
  super auth_url, @@url_endpoint
end

Public Instance Methods

list() click to toggle source
Calls superclass method Keystone::V2_0::Manager::Base#list
# File lib/keystone/v2_0/manager/role.rb, line 14
def list
  roles     = super
  role_list = []

  # map role hash to array of Role objects
  unless roles.nil?
    roles["roles"].each do |role_data|
      role_resource = Keystone::V2_0::Resource::Role.new(role_data)
      role_list << role_resource
    end

    return role_list
  else
    return nil
  end
end