class JMESPath::Nodes::Function
Constants
- FUNCTIONS
Public Class Methods
create(name, children)
click to toggle source
# 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
new(children)
click to toggle source
# File lib/jmespath/nodes/function.rb, line 8 def initialize(children) @children = children end
Public Instance Methods
optimize()
click to toggle source
# File lib/jmespath/nodes/function.rb, line 24 def optimize self.class.new(@children.map(&:optimize)) end
visit(value)
click to toggle source
# File lib/jmespath/nodes/function.rb, line 20 def visit(value) call(@children.map { |child| child.visit(value) }) end
Private Instance Methods
call(args)
click to toggle source
# File lib/jmespath/nodes/function.rb, line 38 def call(args) nil end