Class: Aclize::Acl::Role
- Inherits:
-
Object
- Object
- Aclize::Acl::Role
- Defined in:
- lib/aclize/acl/role.rb
Instance Method Summary collapse
- #controllers(&block) ⇒ Object
-
#initialize(name) ⇒ Role
constructor
A new instance of Role.
- #paths(&block) ⇒ Object
Constructor Details
#initialize(name) ⇒ Role
Returns a new instance of Role.
7 8 9 10 11 |
# File 'lib/aclize/acl/role.rb', line 7 def initialize(name) @name = name.to_s @controllers = Aclize::Acl::ControllersRegistry.new @paths = Aclize::Acl::PathsRegistry.new end |
Instance Method Details
#controllers(&block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/aclize/acl/role.rb', line 13 def controllers(&block) if block_given? @controllers.instance_eval(&block) else return @controllers end end |
#paths(&block) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/aclize/acl/role.rb', line 21 def paths(&block) if block_given? @paths.instance_eval(&block) else return @paths end end |