Sha256: 43e6c99bdb4b7d64b271f6049151a9e019b4913fdb88228fd203d3c445694d86
Contents?: true
Size: 526 Bytes
Versions: 5
Compression:
Stored size: 526 Bytes
Contents
class SchedulerTaskGenerator < Rails::Generators::NamedBase check_class_collision :suffix => 'Task' def create_task template File.join(source_dir, 'example_task.rb'), "scheduled_tasks/#{file_name}_task.rb" readme(File.join(template_dir, 'README')) end def self.source_root File.dirname(File.expand_path(__FILE__)) end private def source_dir File.join(template_dir, 'scheduled_tasks') end def template_dir File.join(File.dirname(__FILE__), 'templates') end end
Version data entries
5 entries across 5 versions & 3 rubygems