Sha256: 38b9114de6e1997f78ea2199837baa29954ba60043625a8070b96bbfb45efcf6

Contents?: true

Size: 443 Bytes

Versions: 1

Compression:

Stored size: 443 Bytes

Contents

module Basket
  class QueueCollection
    def initialize(backend = HashBackend.new)
      @backend = backend
    end

    def push(queue, data)
      @backend.push(queue, data)
      length(queue)
    end

    def length(queue)
      @backend.length(queue)
    end

    def pop_all(queue)
      @backend.pop_all(queue)
    end

    def data
      @backend.data
    end

    def reset_backend
      @backend = HashBackend.new
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
basket-0.0.2 lib/basket/queue_collection.rb