Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/hub_sso_lib.rb
Overview
Method to return a Roles object created from the contents of the Array the method is invoked upon. The array contents will be flattened. After that, each entry must be a single role symbol or string equivalent. Comma-separated lists are not currently allowed (improvements to the roles class could easily give this, but the bloat isn’t needed).
Instance Method Summary collapse
Instance Method Details
#to_authenticated_roles ⇒ Object
2043 2044 2045 2046 2047 2048 2049 2050 |
# File 'lib/hub_sso_lib.rb', line 2043 def to_authenticated_roles roles = HubSsoLib::Roles.new roles.clear self.flatten.each { |entry| roles.add(entry.to_s) } return roles end |