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
1856 1857 1858 1859 1860 1861 1862 1863 |
# File 'lib/hub_sso_lib.rb', line 1856 def to_authenticated_roles roles = HubSsoLib::Roles.new roles.clear self.flatten.each { |entry| roles.add(entry.to_s) } return roles end |