Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 51507288f8
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.449 kb
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
private
def source_dir
File.join(template_dir, 'scheduled_tasks')
end
def template_dir
File.join(File.dirname(__FILE__), 'templates')
end
end
Jump to Line
Something went wrong with that request. Please try again.