Class: Wicked::PipelineGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Wicked::Pipeline::Generators::Helpers
Defined in:
lib/generators/wicked/pipeline/pipeline_generator.rb

Instance Method Summary collapse

Methods included from Wicked::Pipeline::Generators::Helpers

#available_locales, #hashify_locale_keypath, #indented, #options_as_switches, #remove_possible_suffix

Instance Method Details

#create_pipeline_fileObject



16
17
18
# File 'lib/generators/wicked/pipeline/pipeline_generator.rb', line 16

def create_pipeline_file
  template "pipeline.rb", File.join("app/steps", class_path, "#{file_name}_pipeline.rb")
end

#create_step_filesObject



22
23
24
25
26
# File 'lib/generators/wicked/pipeline/pipeline_generator.rb', line 22

def create_step_files
  step_classes.each do |step_class|
    Rails::Generators.invoke "wicked:pipeline:step", [step_class, *options_as_switches], behavior: behavior
  end
end