Class: Reactor::Plans::CreateJob
- Defined in:
- lib/reactor/plans/create_job.rb
Constant Summary
Constants inherited from CommonJob
Reactor::Plans::CommonJob::ALLOWED_PARAMS
Instance Method Summary collapse
-
#initialize(*args) ⇒ CreateJob
constructor
A new instance of CreateJob.
- #migrate! ⇒ Object
- #prepare! ⇒ Object
Methods inherited from CommonJob
Methods included from Prepared
Constructor Details
#initialize(*args) ⇒ CreateJob
Returns a new instance of CreateJob.
8 9 10 11 12 |
# File 'lib/reactor/plans/create_job.rb', line 8 def initialize(*args) super() (name, x), = separate_arguments(*args) @name = name || [:name] end |
Instance Method Details
#migrate! ⇒ Object
18 19 20 |
# File 'lib/reactor/plans/create_job.rb', line 18 def migrate! job = Reactor::Cm::Job.create(@name, @params) end |
#prepare! ⇒ Object
14 15 16 |
# File 'lib/reactor/plans/create_job.rb', line 14 def prepare! error("name is nil") if @name.nil? end |