Class: Erb::Wicked::Pipeline::ControllerGenerator

Inherits:
Generators::Base
  • Object
show all
Includes:
Wicked::Pipeline::Generators::Helpers
Defined in:
lib/generators/erb/wicked/pipeline/controller/controller_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

#copy_step_partial_layout_viewObject



20
21
22
23
24
# File 'lib/generators/erb/wicked/pipeline/controller/controller_generator.rb', line 20

def copy_step_partial_layout_view
  empty_directory base_path

  template "_step.html.erb", File.join(base_path, "_step.html.erb")
end

#create_step_view_filesObject



26
27
28
29
30
31
32
33
34
# File 'lib/generators/erb/wicked/pipeline/controller/controller_generator.rb', line 26

def create_step_view_files
  steps.each do |step_name|
    @step_name = step_name

    template "view.html.erb", File.join(base_path, "#{step_name}.html.erb")
  end

  @step_name = nil
end