class AsciiMath::AST::InfixOp

Public Class Methods

new(operator, e1, e2) click to toggle source
Calls superclass method AsciiMath::AST::InnerNode::new
# File lib/asciimath/ast.rb, line 279
def initialize(operator, e1, e2)
  super()
  add(operator)
  add(e1)
  add(e2)
end

Public Instance Methods

==(o) click to toggle source
# File lib/asciimath/ast.rb, line 303
def ==(o)
  o.class == self.class && o.operator == operator && o.operand1 == operand1 && o.operand2 == operand2
end
operand1() click to toggle source
# File lib/asciimath/ast.rb, line 291
def operand1
  child_nodes[1]
end
operand2() click to toggle source
# File lib/asciimath/ast.rb, line 295
def operand2
  child_nodes[2]
end
operator() click to toggle source
# File lib/asciimath/ast.rb, line 287
def operator
  child_nodes[0]
end
to_s() click to toggle source
# File lib/asciimath/ast.rb, line 299
def to_s
  "#{operand1} #{operator} #{operand2}"
end