Class: Wicked::Pipeline::StepGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Wicked::Pipeline::StepGenerator
show all
- Includes:
- Generators::Helpers
- Defined in:
- lib/generators/wicked/pipeline/step/step_generator.rb
Instance Method Summary
collapse
#available_locales, #hashify_locale_keypath, #indented, #options_as_switches, #remove_possible_suffix
Instance Method Details
#create_locale_file ⇒ Object
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/generators/wicked/pipeline/step/step_generator.rb', line 25
def create_locale_file
return if options[:skip_locales]
@structure = hashify_locale_keypath([*class_path, "#{file_name}_step"].join("."))
available_locales.each do |locale|
@locale = locale
template "locale.yml", File.join("config/locales/steps", class_path, "#{file_name}_step.#{locale}.yml")
end
end
|
#create_step_file ⇒ Object
19
20
21
|
# File 'lib/generators/wicked/pipeline/step/step_generator.rb', line 19
def create_step_file
template "step.rb", File.join("app/steps", class_path, "#{file_name}_step.rb")
end
|