lib/asynchronic/queue_engine/in_memory.rb in asynchronic-0.1.0 vs lib/asynchronic/queue_engine/in_memory.rb in asynchronic-0.2.0
- old
+ new
@@ -3,11 +3,15 @@
class InMemory
attr_reader :default_queue
def initialize(options={})
- @default_queue = options.fetch(:default_queue, Asynchronic.default_queue)
+ @default_queue = options[:default_queue]
@queues ||= Hash.new { |h,k| h[k] = Queue.new }
+ end
+
+ def default_queue
+ @default_queue ||= Asynchronic.default_queue
end
def [](name)
@queues[name]
end
\ No newline at end of file