Class: Redis::Commands::Search::TagEqualityPredicate
- Defined in:
- lib/redis/commands/modules/search/query.rb
Overview
A tag-equality predicate rendering (@field:{value}).
Constant Summary
Constants inherited from Predicate
Predicate::TAG_ESCAPE_PATTERN, Predicate::TAG_SPECIAL_CHARACTERS, Predicate::TEXT_ESCAPE_PATTERN, Predicate::TEXT_SPECIAL_CHARACTERS
Instance Attribute Summary
Attributes inherited from Predicate
Instance Method Summary collapse
-
#initialize(field, value) ⇒ TagEqualityPredicate
constructor
A new instance of TagEqualityPredicate.
-
#to_s ⇒ String
The query-string fragment, e.g.
Constructor Details
#initialize(field, value) ⇒ TagEqualityPredicate
Returns a new instance of TagEqualityPredicate.
657 658 659 660 |
# File 'lib/redis/commands/modules/search/query.rb', line 657 def initialize(field, value) super(field) @value = value end |
Instance Method Details
#to_s ⇒ String
Returns the query-string fragment, e.g. (@color:{red}).
663 664 665 |
# File 'lib/redis/commands/modules/search/query.rb', line 663 def to_s "(@#{@field}:{#{escape_tag(@value)}})" end |