class RunThisAsync::AsyncPlan

Public Class Methods

new(callee, expected_job_id) click to toggle source
# File lib/run_this_async.rb, line 15
def initialize(callee, expected_job_id)
  @callee = ::RunThisAsync::Callee::Encoder.call(callee)
  @expected_job_id = expected_job_id
  @methods_to_call = []
  @with_args = []
end

Public Instance Methods

async() click to toggle source
# File lib/run_this_async.rb, line 22
def async
  ::RunThisAsync::AsyncRunner.perform_async(
    @expected_job_id, @callee, @methods_to_call, @with_args
  )
end
method_missing(name, *args) click to toggle source
# File lib/run_this_async.rb, line 28
def method_missing(name, *args)
  @methods_to_call << name
  @with_args << args

  self
end