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



1088
1089
1090
1091
1092
1093
1094
1095
1096
# File 'lib/hub_sso_lib.rb', line 1088

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

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

  return roles
end