Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/hub_sso_lib.rb

Overview

Method to return a Roles object created from the contents of the String the method is invoked upon. The string may contain a single role or a comma-separated list with no white space.

Instance Method Summary collapse

Instance Method Details

#to_authenticated_rolesObject



2054
2055
2056
2057
2058
2059
2060
2061
2062
# File 'lib/hub_sso_lib.rb', line 2054

def to_authenticated_roles
  roles = HubSsoLib::Roles.new
  array = self.split(',')

  roles.clear
  array.each { |role| roles.add(role) }

  return roles
end