Class: GraniteGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- GraniteGenerator
- Defined in:
- lib/generators/granite_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#create_action ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/granite_generator.rb', line 7 def create_action template 'granite_action.rb.erb', "apq/actions/#{file_path}.rb" unless .collection? template 'granite_business_action.rb.erb', "apq/actions/#{class_path.join('/')}/business_action.rb" end template 'granite_base_action.rb.erb', 'apq/actions/base_action.rb', skip: true template 'granite_action_spec.rb.erb', "spec/apq/actions/#{file_path}_spec.rb" empty_directory "apq/actions/#{file_path}/#{projector}" if projector end |