You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/lib/lazy_work_queue.rb

24 lines
421 B
Ruby

# Taken from https://github.com/mperham/girl_friday/issues/47
class LazyWorkQueue < GirlFriday::WorkQueue
include Singleton
def self.define *options, &block
Class.new LazyWorkQueue do
define_method :initialize do
super *options do |info|
block.call
end
end
end
end
def self.push *args
instance.push *args
end
def self.status
instance.status
end
end