Sha256: 03a105698969111a3edff160d4bda71679881f5515c4b42bebd2440ae6b1e6eb

Contents?: true

Size: 431 Bytes

Versions: 8

Compression:

Stored size: 431 Bytes

Contents

module Vedeu
  module Queue
    extend self

    def dequeue
      store.pop
    end

    def enqueue(result)
      store.unshift(result)

      self
    end

    def enqueued?
      store.size > 0
    end

    def entries
      store
    end

    def size
      store.size
    end

    def reset
      store.clear
    end

    def view
      store.inspect
    end

    private

    def store
      @store ||= []
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vedeu-0.1.0 lib/vedeu/support/queue.rb
vedeu-0.0.42 lib/vedeu/support/queue.rb
vedeu-0.0.41 lib/vedeu/support/queue.rb
vedeu-0.0.40 lib/vedeu/support/queue.rb
vedeu-0.0.39 lib/vedeu/support/queue.rb
vedeu-0.0.38 lib/vedeu/support/queue.rb
vedeu-0.0.37 lib/vedeu/support/queue.rb
vedeu-0.0.36 lib/vedeu/support/queue.rb