Class: JsonQuery::QueryMatchResults
- Inherits:
-
Object
- Object
- JsonQuery::QueryMatchResults
- Defined in:
- lib/json_query/query_match_results.rb
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
- #has_matching_paths? ⇒ Boolean
-
#initialize(query:, paths: []) ⇒ QueryMatchResults
constructor
A new instance of QueryMatchResults.
Constructor Details
#initialize(query:, paths: []) ⇒ QueryMatchResults
4 5 6 |
# File 'lib/json_query/query_match_results.rb', line 4 def initialize(query:, paths: []) @query, @paths = query, paths end |
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
3 4 5 |
# File 'lib/json_query/query_match_results.rb', line 3 def paths @paths end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
3 4 5 |
# File 'lib/json_query/query_match_results.rb', line 3 def query @query end |
Instance Method Details
#has_matching_paths? ⇒ Boolean
8 9 10 |
# File 'lib/json_query/query_match_results.rb', line 8 def has_matching_paths? paths.any? end |