Class: Workhorse::Jobs::RunRailsOp

Inherits:
Object
  • Object
show all
Defined in:
lib/workhorse/jobs/run_rails_op.rb

Instance Method Summary collapse

Constructor Details

#initialize(cls, params = {}) ⇒ RunRailsOp

Returns a new instance of RunRailsOp.



3
4
5
6
# File 'lib/workhorse/jobs/run_rails_op.rb', line 3

def initialize(cls, params = {})
  @cls = cls
  @params = params
end

Instance Method Details

#job_classObject



8
9
10
# File 'lib/workhorse/jobs/run_rails_op.rb', line 8

def job_class
  @cls
end

#performObject



12
13
14
# File 'lib/workhorse/jobs/run_rails_op.rb', line 12

def perform
  @cls.run!(@params)
end