class Interscript::Node::Tests

Attributes

data[RW]

Public Class Methods

new(data=[]) click to toggle source
# File lib/interscript/node/tests.rb, line 3
def initialize data=[]
  @data = data
end

Public Instance Methods

<<(pair) click to toggle source
# File lib/interscript/node/tests.rb, line 7
def <<(pair)
  @data << pair
end
==(other) click to toggle source
Calls superclass method Interscript::Node#==
# File lib/interscript/node/tests.rb, line 17
def ==(other)
  super && self.data == other.data
end
reverse() click to toggle source
# File lib/interscript/node/tests.rb, line 11
def reverse
  self.class.new(data.map do |from,to,reverse_run|
    [to, from, reverse_run == nil ? nil : !reverse_run]
  end)
end
to_hash() click to toggle source
# File lib/interscript/node/tests.rb, line 21
def to_hash
  { :class => self.class.to_s,
    :data => @data }
end