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.2.11 lib/resque/self_lookup.rb
zuora_connect-3.2.10 lib/resque/self_lookup.rb
zuora_connect-3.2.9 lib/resque/self_lookup.rb
zuora_connect-3.2.8 lib/resque/self_lookup.rb
zuora_connect-3.2.7 lib/resque/self_lookup.rb
zuora_connect-3.2.6 lib/resque/self_lookup.rb
zuora_connect-3.2.5 lib/resque/self_lookup.rb
zuora_connect-3.2.4 lib/resque/self_lookup.rb
zuora_connect-3.2.3 lib/resque/self_lookup.rb
zuora_connect-3.2.2 lib/resque/self_lookup.rb
zuora_connect-3.2.0 lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.g lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.f lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.e lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.d lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.c lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.b lib/resque/self_lookup.rb
zuora_connect-3.1.5.pre.a lib/resque/self_lookup.rb
zuora_connect-3.1.5 lib/resque/self_lookup.rb
zuora_connect-3.1.4 lib/resque/self_lookup.rb