Class: RobotLab::Generators::JobGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/robot_lab/job_generator.rb

Overview

Generates a RobotLab job subclass pre-wired to a specific robot class.

Usage:

rails generate robot_lab:job NAME [options]

Examples:

rails generate robot_lab:job Support
# => app/jobs/support_job.rb  (robot_class SupportRobot)

Instance Method Summary collapse

Instance Method Details

#create_job_filevoid

This method returns an undefined value.

Creates the job file.



25
26
27
# File 'lib/generators/robot_lab/job_generator.rb', line 25

def create_job_file
  template "robot_job.rb.tt", "app/jobs/#{file_name}_job.rb"
end