Class: SchedulerTaskGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- SchedulerTaskGenerator
- Defined in:
- lib/scheduler_daemon/rails/generators/scheduler_task/scheduler_task_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
9 10 11 |
# File 'lib/scheduler_daemon/rails/generators/scheduler_task/scheduler_task_generator.rb', line 9 def self.source_root File.dirname(File.(__FILE__)) end |
Instance Method Details
#create_task ⇒ Object
4 5 6 7 |
# File 'lib/scheduler_daemon/rails/generators/scheduler_task/scheduler_task_generator.rb', line 4 def create_task template File.join(source_dir, 'example_task.rb'), "scheduled_tasks/#{file_name}_task.rb" readme(File.join(template_dir, 'README')) end |