# File lib/jmespath/nodes/function.rb, line 12 def self.create(name, children) if (type = FUNCTIONS[name]) type.new(children) else raise Errors::UnknownFunctionError, "unknown function #{name}()" end end
# File lib/jmespath/nodes/function.rb, line 8 def initialize(children) @children = children end
# File lib/jmespath/nodes/function.rb, line 24 def optimize self.class.new(@children.map(&:optimize)) end
# File lib/jmespath/nodes/function.rb, line 20 def visit(value) call(@children.map { |child| child.visit(value) }) end
# File lib/jmespath/nodes/function.rb, line 38 def call(args) nil end