Class: PolicyDefinitionGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- PolicyDefinitionGenerator
- Defined in:
- lib/generators/policy_definition_generator.rb
Overview
Generates a definition file for a namespace.
Instance Method Summary collapse
Instance Method Details
#create_policy_definition_file ⇒ Object
9 10 11 12 13 |
# File 'lib/generators/policy_definition_generator.rb', line 9 def create_policy_definition_file return if processed_name.blank? template 'definitions.rb', "app/policies/#{processed_name}/definitions.rb" end |