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.



428
429
430
431
# File 'lib/asciimath/ast.rb', line 428

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

Instance Method Details

#==(o) ⇒ Object



437
438
439
# File 'lib/asciimath/ast.rb', line 437

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

#to_sObject



433
434
435
# File 'lib/asciimath/ast.rb', line 433

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