Class: AsciiMath::AST::MatrixRow

Inherits:
InnerNode show all
Defined in:
lib/asciimath/ast.rb

Instance Attribute Summary

Attributes inherited from Node

#parent

Instance Method Summary collapse

Methods inherited from InnerNode

#[], #each, #length

Constructor Details

#initialize(nodes) ⇒ MatrixRow

Returns a new instance of MatrixRow.



430
431
432
433
# File 'lib/asciimath/ast.rb', line 430

def initialize(nodes)
  super()
  nodes.each { |node| add(node || Empty.new) }
end

Instance Method Details

#==(o) ⇒ Object



439
440
441
# File 'lib/asciimath/ast.rb', line 439

def ==(o)
  o.class == self.class && o.child_nodes == child_nodes
end

#to_sObject



435
436
437
# File 'lib/asciimath/ast.rb', line 435

def to_s
  "(" + child_nodes.map { |node| node.to_s }.join(",") + ")"
end