Class: Backgroundrb::Generators::WorkerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/backgroundrb/worker/worker_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



4
5
6
# File 'lib/generators/backgroundrb/worker/worker_generator.rb', line 4

def self.source_root
  @source_root ||= File.expand_path('../templates', __FILE__)
end

Instance Method Details

#copy_backgroundrb_workerObject



8
9
10
11
# File 'lib/generators/backgroundrb/worker/worker_generator.rb', line 8

def copy_backgroundrb_worker
  template "worker.rb", "lib/workers/#{file_name}_worker.rb"
  #template "unit_test.rb", "test/unit/#{file_name}_worker_test.rb"
end