lib/pigeon/queue.rb
def length(filter_name = nil, &block)
    filter_proc = @filters[filter_name] 
  
    @filters.synchronize do
      filter_proc ? @tasks.count(&filter_proc) : nil
    end
  end
# Returns the number of entries in the queue. If filter_name is given, then
# will return the number of matching tasks. An optional block can further
# restrict qualifying tasks.
Returns the number of entries in the queue. If filter_name is given, then
will return the number of matching tasks. An optional block can further
restrict qualifying tasks.
Returns the number of entries in the queue . If filter_name is given then will return the number of matching tasks . An optional block can further restrict qualifying tasks .
def length(filter_name = nil, &block)
    filter_proc = @filters[filter_name] 
    @filters.synchronize do
      filter_proc ? @tasks.count(&filter_proc) : nil
    end
  end
def length ( filter_name = nil , & block ) filter_proc = @filters [ filter_name ] @filters . synchronize do filter_proc ? @tasks . count ( & filter_proc ) : nil end end
Returns the number of entries in the queue.
Returns the number of entries in the queue .
filter_name
block