Sha256: 0128d4eac556af71e5ea9fd9129b36b945f81e1c1697fdbc2dbd33f8482596e5

Contents?: true

Size: 341 Bytes

Versions: 9

Compression:

Stored size: 341 Bytes

Contents

module RoleAuthorization
  module Roles
    module ClassMethods
      # this can be called multiple times
      def configure(&block)
        (@role_manager ||= RoleAuthorization::Roles::Manager.new).instance_eval(&block)
      end

      def manager
        @role_manager || configure {}
      end
    end
    extend ClassMethods
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
role_authorization-0.9.6 lib/role_authorization/roles.rb
role_authorization-0.9.5 lib/role_authorization/roles.rb
role_authorization-0.9.4 lib/role_authorization/roles.rb
role_authorization-0.9.3 lib/role_authorization/roles.rb
role_authorization-0.9.2 lib/role_authorization/roles.rb
role_authorization-0.9.1 lib/role_authorization/roles.rb
role_authorization-0.9.0 lib/role_authorization/roles.rb
role_authorization-0.6.2 lib/role_authorization/roles.rb
role_authorization-0.6.1 lib/role_authorization/roles.rb