Skip to content

Instantly share code, notes, and snippets.

@banister
Forked from jtoy/gist:701044
Created November 15, 2010 22:12
Show Gist options
  • Save banister/701053 to your computer and use it in GitHub Desktop.
Save banister/701053 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