Sha256: aab134627a80bfaaf8a0029169c7f4257da5cda3047ed197705c4d87cdfdfa11
Contents?: true
Size: 332 Bytes
Versions: 1
Compression:
Stored size: 332 Bytes
Contents
module ReUser class RoleDefinition def initialize(definition) @roles = {} instance_eval &definition end def roles @roles end def role name, permissions=[], &block role = ReUser::Role.new(name, permissions) yield(role) if block_given? @roles[name] = role end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reuser-3.1.0 | lib/reuser/role_definition.rb |