class AsciiMath::AST::InnerNode
Public Class Methods
new()
click to toggle source
Calls superclass method
AsciiMath::AST::Node::new
# File lib/asciimath/ast.rb, line 85 def initialize super @children = [] end
Public Instance Methods
[](*args)
click to toggle source
# File lib/asciimath/ast.rb, line 90 def [](*args) @children[*args] end
each(&block)
click to toggle source
# File lib/asciimath/ast.rb, line 98 def each(&block) @children.each(&block) end
length()
click to toggle source
# File lib/asciimath/ast.rb, line 94 def length @children.length end
Protected Instance Methods
add(node)
click to toggle source
# File lib/asciimath/ast.rb, line 108 def add(node) node.parent.remove(node) if node.parent node.parent = self child_nodes << node end
child_nodes()
click to toggle source
# File lib/asciimath/ast.rb, line 104 def child_nodes @children end
remove(node)
click to toggle source
# File lib/asciimath/ast.rb, line 114 def remove(node) node.parent = nil child_nodes.delete(node) end