Class: AsciiMath::AST::Matrix
- Defined in:
- lib/asciimath/ast.rb
Instance Attribute Summary collapse
-
#lparen ⇒ Object
readonly
Returns the value of attribute lparen.
-
#rparen ⇒ Object
readonly
Returns the value of attribute rparen.
Attributes inherited from Node
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(lparen, rows, rparen) ⇒ Matrix
constructor
A new instance of Matrix.
- #to_s ⇒ Object
Methods inherited from InnerNode
Constructor Details
Instance Attribute Details
#lparen ⇒ Object (readonly)
Returns the value of attribute lparen.
404 405 406 |
# File 'lib/asciimath/ast.rb', line 404 def lparen @lparen end |
#rparen ⇒ Object (readonly)
Returns the value of attribute rparen.
405 406 407 |
# File 'lib/asciimath/ast.rb', line 405 def rparen @rparen end |
Instance Method Details
#==(o) ⇒ Object
421 422 423 424 425 426 |
# File 'lib/asciimath/ast.rb', line 421 def ==(o) o.class == self.class && o.lparen == lparen && o.child_nodes == child_nodes && o.rparen == rparen end |
#to_s ⇒ Object
414 415 416 417 418 419 |
# File 'lib/asciimath/ast.rb', line 414 def to_s s = "" s << (lparen.nil? ? '{:' : lparen.text) s << child_nodes.map { |node| node.to_s }.join(",") s << (rparen.nil? ? ':}' : rparen.text) end |