Class: Rails::Generators::JobGenerator
- Inherits:
-
NamedBase
- Object
- NamedBase
- Rails::Generators::JobGenerator
- Defined in:
- lib/rails/generators/job/job_generator.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_generator_root ⇒ Object
16 17 18 |
# File 'lib/rails/generators/job/job_generator.rb', line 16 def self.default_generator_root __dir__ end |
Instance Method Details
#create_job_file ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/rails/generators/job/job_generator.rb', line 20 def create_job_file template "job.rb", File.join("app/jobs", class_path, "#{file_name}_job.rb") in_root do if behavior == :invoke && !File.exist?(application_job_file_name) template "application_job.rb", application_job_file_name end end end |