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



2023
2024
2025
2026
2027
2028
2029
2030
2031
# File 'lib/hub_sso_lib.rb', line 2023

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

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

  return roles
end