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



2049
2050
2051
2052
2053
2054
2055
2056
2057
# File 'lib/hub_sso_lib.rb', line 2049

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

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

  return roles
end