Class: Sidekiq::Generators::JobGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Sidekiq::Generators::JobGenerator
- Defined in:
- lib/generators/sidekiq/job_generator.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_generator_root ⇒ Object
12 13 14 |
# File 'lib/generators/sidekiq/job_generator.rb', line 12 def self.default_generator_root File.dirname(__FILE__) end |
Instance Method Details
#create_job_file ⇒ Object
16 17 18 |
# File 'lib/generators/sidekiq/job_generator.rb', line 16 def create_job_file template "job.rb.erb", File.join("app/sidekiq", class_path, "#{file_name}_job.rb") end |
#create_test_file ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/generators/sidekiq/job_generator.rb', line 20 def create_test_file return unless test_framework if test_framework == :rspec create_job_spec else create_job_test end end |