Skip to content

Instantly share code, notes, and snippets.

@d11wtq
Created May 7, 2012 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d11wtq/2625421 to your computer and use it in GitHub Desktop.
Save d11wtq/2625421 to your computer and use it in GitHub Desktop.
module Flippa
module Job
# Allow Resque jobs to be instantiated and performed, instead of singleton classes.
module Instance
extend ActiveSupport::Concern
module ClassMethods
# Default .perform creates an instance and calls perform on that.
def perform(*args)
new(*args).perform(*args)
end
end
# Arguments are passed to an initializer, if desirable.
def initialize(*) # stub
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment