class SuckerPunch::Backgroundable::BackgroundProxy

@api private

Public Class Methods

new(receiver, options, seconds = 0) click to toggle source
# File lib/sucker_punch/backgroundable/backgroundable.rb, line 137
def initialize(receiver, options, seconds = 0)
  @receiver = receiver
  @options = options
  @seconds = seconds
end

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
# File lib/sucker_punch/backgroundable/backgroundable.rb, line 143
def method_missing(method, *args, &block)
  @receiver.method_missing(method, *args, &block) unless @receiver.respond_to?(method)
  raise ArgumentError.new("Backgrounding a method with a block argument is not supported.") if block_given?
  JobRunner.new(@receiver, method, args, @options).run(@seconds)
end