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
Returns a new instance of FilterMethod.
117 118 119 120 121 122 |
# File 'lib/acl9/controller_extensions/generators.rb', line 117 def initialize(subject_method, method_name) super @method_name = method_name @controller = nil end |
Instance Method Details
#install_on(controller_class, options) ⇒ Object
124 125 126 127 128 |
# File 'lib/acl9/controller_extensions/generators.rb', line 124 def install_on(controller_class, ) super _add_method(controller_class) controller_class.send(:before_filter, @method_name, ) end |