Class: ElasticsearchQueryParser::Grammar::Presenters::Term
- Inherits:
-
Object
- Object
- ElasticsearchQueryParser::Grammar::Presenters::Term
- Defined in:
- lib/elasticsearch_query_parser/grammar/presenters/term.rb
Instance Method Summary collapse
-
#initialize(term) ⇒ Term
constructor
A new instance of Term.
- #to_elasticsearch ⇒ Object
Constructor Details
#initialize(term) ⇒ Term
Returns a new instance of Term.
8 9 10 |
# File 'lib/elasticsearch_query_parser/grammar/presenters/term.rb', line 8 def initialize(term) @term = term.to_s end |
Instance Method Details
#to_elasticsearch ⇒ Object
12 13 14 15 16 17 |
# File 'lib/elasticsearch_query_parser/grammar/presenters/term.rb', line 12 def to_elasticsearch { query: term, operator: "and" } end |