Skip to content

Instantly share code, notes, and snippets.

@jtoy
Created November 15, 2010 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jtoy/701044 to your computer and use it in GitHub Desktop.
Save jtoy/701044 to your computer and use it in GitHub Desktop.
class Foo
def self.create(options = {})
if options[:queue]
self.instance_eval do
def queue
#{options[:queue].to_sym}
end
end
end
self.enqueue(self, options)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment