Class: AsciiMath::AST::InnerNode

Inherits:
Node
  • Object
show all
Includes:
Enumerable
Defined in:
lib/asciimath/ast.rb

Direct Known Subclasses

BinaryOp, Group, InfixOp, Matrix, MatrixRow, Paren, Sequence, SubSup, UnaryOp

Instance Attribute Summary

Attributes inherited from Node

#parent

Instance Method Summary collapse

Constructor Details

#initializeInnerNode

Returns a new instance of InnerNode.



85
86
87
88
# File 'lib/asciimath/ast.rb', line 85

def initialize
  super
  @children = []
end

Instance Method Details

#[](*args) ⇒ Object



90
91
92
# File 'lib/asciimath/ast.rb', line 90

def [](*args)
  @children[*args]
end

#each(&block) ⇒ Object



98
99
100
# File 'lib/asciimath/ast.rb', line 98

def each(&block)
  @children.each(&block)
end

#lengthObject



94
95
96
# File 'lib/asciimath/ast.rb', line 94

def length
  @children.length
end