Class: Acl9::Dsl::Generators::FilterMethod
- Inherits:
-
BaseGenerator
- Object
- Base
- BaseGenerator
- Acl9::Dsl::Generators::FilterMethod
- Defined in:
- lib/acl9/controller_extensions/generators.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(subject_method, method_name) ⇒ FilterMethod
constructor
A new instance of FilterMethod.
- #install_on(controller_class, options) ⇒ Object
Methods inherited from Base
#acl_block!, #allowance_expression, #default_action
Constructor Details
#initialize(subject_method, method_name) ⇒ FilterMethod
78 79 80 81 82 83 |
# File 'lib/acl9/controller_extensions/generators.rb', line 78 def initialize(subject_method, method_name) super @method_name = method_name @controller = nil end |
Instance Method Details
#install_on(controller_class, options) ⇒ Object
85 86 87 88 89 |
# File 'lib/acl9/controller_extensions/generators.rb', line 85 def install_on(controller_class, ) super _add_method(controller_class) controller_class.send(:before_filter, @method_name, ) end |