hook_for(*names, &block)
Class Public methods
Invoke a generator based on the value supplied by the user to the given
option named ânameâ. A class option is created
when this method is invoked and you can set a hash to customize it.
Examples
module Rails::Generators
class ControllerGenerator < Base
hook_for :test_framework, aliases: "-t"
end
end
The example above will create a test framework option and will invoke a
generator based on the user supplied value.
For ex