Module: Metrician::Jobs::ResquePlugin::Installer
- Defined in:
- lib/metrician/jobs/resque_plugin.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
35 36 37 38 |
# File 'lib/metrician/jobs/resque_plugin.rb', line 35 def self.included(base) base.send(:alias_method, :payload_class_without_metrician, :payload_class) base.send(:alias_method, :payload_class, :payload_class_with_metrician) end |
Instance Method Details
#payload_class_with_metrician ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/metrician/jobs/resque_plugin.rb', line 40 def payload_class_with_metrician payload_class_without_metrician.tap do |klass| unless klass.respond_to?(:around_perform_with_metrician) klass.instance_eval do extend(::Metrician::Jobs::ResquePlugin::Extension) end end end end |