class Gammo::XPath::AST::ArithmeticExpr
Class for representing Arithmetic operators. @!visibility private
Public Class Methods
new(a, b)
click to toggle source
Calls superclass method
Gammo::XPath::AST::BinaryExpr::new
# File lib/gammo/xpath/ast/expression.rb, line 163 def initialize(a, b) super(a, b) end
Public Instance Methods
evaluate(context)
click to toggle source
# File lib/gammo/xpath/ast/expression.rb, line 167 def evaluate(context) # Expects left/right to be Integer. Value::Number.new(do_arithmetic(*evaluate_values(context).map(&:to_number))) end