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.
7 8 9 10 11 |
# File 'lib/reactor/plans/create_job.rb', line 7 def initialize(*args) super() (name, x), = separate_arguments(*args) @name = name || [:name] end |
Instance Method Details
#migrate! ⇒ Object
17 18 19 |
# File 'lib/reactor/plans/create_job.rb', line 17 def migrate! Reactor::Cm::Job.create(@name, @params) end |
#prepare! ⇒ Object
13 14 15 |
# File 'lib/reactor/plans/create_job.rb', line 13 def prepare! error("name is nil") if @name.nil? end |