Method: JSI::Ptr#evaluate
- Defined in:
- lib/jsi/ptr.rb
#evaluate(document, *a, **kw) ⇒ Object
takes a root json document and evaluates this pointer through the document, returning the value pointed to by this pointer.
124 125 126 127 128 129 130 |
# File 'lib/jsi/ptr.rb', line 124 def evaluate(document, *a, **kw) res = tokens.inject(document) do |value, token| _, child = node_subscript_token_child(value, token, *a, **kw) child end res end |