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.2.pre.l lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.k lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.j lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.i lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.h lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.g lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.f lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.e lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.d lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.c lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.b lib/resque/self_lookup.rb
zuora_connect-3.0.2.pre.a lib/resque/self_lookup.rb
zuora_connect-3.0.1 lib/resque/self_lookup.rb
zuora_connect-3.0.1.pre.d lib/resque/self_lookup.rb
zuora_connect-3.0.1.pre.c lib/resque/self_lookup.rb
zuora_connect-3.0.1.pre.b lib/resque/self_lookup.rb
zuora_connect-3.0.1.pre.a lib/resque/self_lookup.rb
zuora_connect-3.0.0 lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.y lib/resque/self_lookup.rb
zuora_connect-3.0.0.pre.x lib/resque/self_lookup.rb