lib/roles_generic/role.rb in roles_generic-0.2.4 vs lib/roles_generic/role.rb in roles_generic-0.2.5

- old
+ new

@@ -27,9 +27,17 @@ result end class << self attr_accessor :roles + + def all + roles.to_a + end + + def names + roles.map(&:name) + end end def initialize name @name = name self.class.roles ||= Set.new