Sha256: 1c4a37f5f81e94eb11bd694369275dbd785c6c9d8f84dd4e63636785be023824

Contents?: true

Size: 237 Bytes

Versions: 10

Compression:

Stored size: 237 Bytes

Contents

module SuckerPunch
  module Job
    def async
      AsyncProxy.new(self)
    end
  end

  class AsyncProxy
    def initialize(job)
      @job = job
    end

    def perform(*args)
      @job.class.perform_async(*args)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sucker_punch-2.1.2 lib/sucker_punch/async_syntax.rb
sucker_punch-2.1.1 lib/sucker_punch/async_syntax.rb
sucker_punch-2.1.0 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.4 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.3 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.2 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.1 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.0 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.0.beta2 lib/sucker_punch/async_syntax.rb
sucker_punch-2.0.0.beta1 lib/sucker_punch/async_syntax.rb