Class: Backgroundrb::Generators::WorkerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Backgroundrb::Generators::WorkerGenerator
- Defined in:
- lib/generators/backgroundrb/worker/worker_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
4 5 6 |
# File 'lib/generators/backgroundrb/worker/worker_generator.rb', line 4 def self.source_root @source_root ||= File.('../templates', __FILE__) end |
Instance Method Details
#copy_backgroundrb_worker ⇒ Object
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 |