Class: CommonGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- CommonGenerator
- Defined in:
- lib/generators/common_generator.rb
Overview
Generator for new particles.
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#generate ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/common_generator.rb', line 7 def generate self.class.source_root(File.('templates', __dir__)) template "#{self.class.generator_name}.erb", File.join('app/flows', class_path, "#{file_name}.rb") return unless [:spec] template 'spec.erb', File.join('spec/flows', class_path, "#{file_name}_spec.rb") end |