Sha256: dfffefc474d8b011308f690990c740d396f566f2bbf079d61acf1c8a5d32bc88

Contents?: true

Size: 323 Bytes

Versions: 36

Compression:

Stored size: 323 Bytes

Contents

module RoleAuthorization
  module Roles
    class RoleGroup
      attr_accessor :klass, :roles

      def initialize(klass, roles)
        @klass = klass
        @roles = roles
      end

      def users(scope = nil)
        klass.find_all_by_name(roles).map {|role| role.users(scope) }.flatten
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
role_authorization-0.9.6 lib/role_authorization/roles/role_group.rb
role_authorization-0.9.5 lib/role_authorization/roles/role_group.rb
role_authorization-0.9.4 lib/role_authorization/roles/role_group.rb
role_authorization-0.9.3 lib/role_authorization/roles/role_group.rb
role_authorization-0.9.2 lib/role_authorization/roles/role_group.rb
role_authorization-0.9.1 lib/role_authorization/roles/role_group.rb
role_authorization-0.9.0 lib/role_authorization/roles/role_group.rb
role_authorization-0.6.2 lib/role_authorization/roles/role_group.rb
role_authorization-0.6.1 lib/role_authorization/roles/role_group.rb
role_authorization-0.6.0 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.9 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.8 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.7 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.6 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.5 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.4 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.3 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.2 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.1 lib/role_authorization/roles/role_group.rb
role_authorization-0.5.0 lib/role_authorization/roles/role_group.rb