Class: NotificationHub::Generators::JobGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/notification_hub/job_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_job_fileObject



9
10
11
12
13
14
15
# File 'lib/generators/notification_hub/job_generator.rb', line 9

def copy_job_file
  if background_processor == "active_job"
    template "jobs/active_job.rb", "app/jobs/notification_hub_job.rb"
  elsif background_processor == "sidekiq"
    template "jobs/sidekiq_job.rb", "app/jobs/notification_hub_job.rb"
  end
end