class AsciiMath::AST::UnaryOp

Public Class Methods

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

Public Instance Methods

==(o) click to toggle source
# File lib/asciimath/ast.rb, line 243
def ==(o)
  o.class == self.class && o.operator == operator && o.operand == operand
end
operand() click to toggle source
# File lib/asciimath/ast.rb, line 235
def operand
  child_nodes[1]
end
operator() click to toggle source
# File lib/asciimath/ast.rb, line 231
def operator
  child_nodes[0]
end
to_s() click to toggle source
# File lib/asciimath/ast.rb, line 239
def to_s
  "#{operator} #{operand}"
end