Class: Souffle::Node::RunList

Inherits:
Array
  • Object
show all
Defined in:
lib/souffle/node/runlist.rb

Overview

A specialized Array that handles runlist items appropriately.

Instance Method Summary collapse

Instance Method Details

#<<(item) ⇒ Object

Pushes another runlist item onto the runlist array.

Parameters:

  • item (String)

    The runlist item as a string.



9
10
11
12
# File 'lib/souffle/node/runlist.rb', line 9

def <<(item)
  item = Souffle::Node::RunListItem.new(item)
  super(item)
end

#push(item) ⇒ Object

Pushes another item onto the runlist array.

Parameters:

  • item (String)

    The runlist item as a string.



17
18
19
20
# File 'lib/souffle/node/runlist.rb', line 17

def push(item)
  item = Souffle::Node::RunListItem.new(item)
  super(item)
end

#to_hashHash

Returns the description of a run_list in hash format.

Returns:

  • (Hash)

    The description of a run_list in hash format.



25
26
27
# File 'lib/souffle/node/runlist.rb', line 25

def to_hash
  map.each { |item| item.to_s }
end