Sha256: 5396461d766d951a3c5106159d65f1078dcb66dd6fc642e1aa4438a4df0667df

Contents?: true

Size: 603 Bytes

Versions: 445

Compression:

Stored size: 603 Bytes

Contents

module Resque
  module SelfLookup
    def payload_class_enhanced
      @payload_class ||= constantize(@payload['class'])
      @payload_class.instance_eval { class << self; self end }.send(:attr_accessor, :worker)
      @payload_class.instance_eval { class << self; self end }.send(:attr_accessor, :job)
      @payload_class.worker =  self.worker
      @payload_class.job =  self
      return @payload_class
    end

    def self.included(receiver)
      receiver.class_eval do
        alias payload_class_old payload_class
        alias payload_class payload_class_enhanced
      end
    end
  end
end

Version data entries

445 entries across 445 versions & 4 rubygems

Version Path
zuora_connect-3.0.0.pre.w lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.v lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.u lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.t lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.s lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.r lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.q lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.p lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.o lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.n lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.m lib/resque/self_lookup.rb
zuora_connect-3.0.0l lib/resque/self_lookup.rb
zuora_connect-3.0.0k lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.j lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.i lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.h lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.g lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.f lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.e lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.d lib/resque/self_lookup.rb