Class: AbstractEventedQueue Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/evented-queue/abstract.rb

Overview

This class is abstract.

Abstract evented queue.

Direct Known Subclasses

EventedQueue

Instance Method Summary collapse

Instance Method Details

#clear {|nil| ... } ⇒ Object Also known as: clear!

This method is abstract.

Clears the queue.

Yields:

  • (nil)


66
67
68
# File 'lib/evented-queue/abstract.rb', line 66

def clear(&block)
    not_implemented
end

#empty? {|Boolean| ... } ⇒ Boolean

This method is abstract.

Indicates queue is empty.

Yields:

  • (Boolean)

    true it it is, false otherwise

Returns:

  • (Boolean)

    true it it is, false otherwise



55
56
57
# File 'lib/evented-queue/abstract.rb', line 55

def empty?(&block)
    not_implemented
end

#length {|Integer| ... } ⇒ Integer

This method is abstract.

Indicates length of the queue.

Yields:

  • (Integer)

    queue length

Returns:

  • (Integer)

    queue length



43
44
45
# File 'lib/evented-queue/abstract.rb', line 43

def length(&block)
    not_implemented
end

#pop {|Object| ... } ⇒ Object

This method is abstract.

Pushes value out of the queue.

Yields:

  • (Object)

    an object from the queue



31
32
33
# File 'lib/evented-queue/abstract.rb', line 31

def pop(&block)
    not_implemented
end

#push(value, &block) ⇒ Object

This method is abstract.

Pushes value into the queue.

Parameters:

  • value (Object)

    object to push



20
21
22
# File 'lib/evented-queue/abstract.rb', line 20

def push(value, &block)
    not_implemented
end