8 lines
351 B
Ruby
8 lines
351 B
Ruby
class EmailJobGenerator < Rails::Generators::NamedBase
|
|
argument :attribs, :type => :array
|
|
source_root File.expand_path('../templates', __FILE__)
|
|
def copy_file_to_lib
|
|
template 'email_job_template.erb', "lib/job_types/#{name.underscore}.rb"
|
|
template 'email_job_spec_template.erb', "spec/lib/job_types/#{name.underscore}_spec.rb"
|
|
end
|
|
end
|