Class: JSONP3::RootQueryExpression

Inherits:
QueryExpression show all
Defined in:
lib/json_p3/filter.rb

Overview

An embedded query starting at the root node.

Instance Attribute Summary

Attributes inherited from QueryExpression

#query

Attributes inherited from Expression

#token

Instance Method Summary collapse

Methods inherited from QueryExpression

#==, #hash, #initialize

Methods inherited from Expression

#initialize

Constructor Details

This class inherits a constructor from JSONP3::QueryExpression

Instance Method Details

#evaluate(context) ⇒ Object



339
340
341
# File 'lib/json_p3/filter.rb', line 339

def evaluate(context)
  @query.find(context.root)
end

#to_sObject



343
344
345
# File 'lib/json_p3/filter.rb', line 343

def to_s
  @query.to_s
end