Created
May 19, 2012 17:47
-
-
Save npj/2731680 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/queue/base.rb | |
class Queue::Base | |
class << self | |
def enqueue(object, method, *args) | |
# ...to be continued | |
end | |
def perform | |
# ...to be continued | |
end | |
end | |
end | |
# app/models/queue/high.rb | |
class Queue::High < Queue::Base | |
@queue = :high | |
end | |
# app/models/queue/normal.rb | |
class Queue::Normal < Queue::Base | |
@queue = :normal | |
end | |
# app/models/queue/low.rb | |
class Queue::Low < Queue::Base | |
@queue = :low | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment