Class: Janeway::Interpreters::RootNodeInterpreter
- Defined in:
- lib/janeway/interpreters/root_node_interpreter.rb
Overview
Interprets the root identifer, returns results or forwards them to next selector.
This is required at the beginning of every jsonpath query. It may also be used within filter selector expressions.
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#interpret(_input, _parent, root, _path = nil) ⇒ Object
Start an expression chain using the entire, unfiltered input.
Methods inherited from Base
#as_json, #initialize, #selector, #to_s, #type
Constructor Details
This class inherits a constructor from Janeway::Interpreters::Base
Instance Method Details
#interpret(_input, _parent, root, _path = nil) ⇒ Object
Start an expression chain using the entire, unfiltered input.
18 19 20 21 22 |
# File 'lib/janeway/interpreters/root_node_interpreter.rb', line 18 def interpret(_input, _parent, root, _path = nil) return [root] unless @next @next.interpret(root, nil, root, ['$']) end |