Class: LuceneQuery::InfixOperator
- Inherits:
-
Object
- Object
- LuceneQuery::InfixOperator
- Defined in:
- lib/lucene_query.rb
Instance Method Summary collapse
-
#initialize(*terms) ⇒ InfixOperator
constructor
A new instance of InfixOperator.
- #to_lucene ⇒ Object
Constructor Details
#initialize(*terms) ⇒ InfixOperator
Returns a new instance of InfixOperator.
71 |
# File 'lib/lucene_query.rb', line 71 def initialize(*terms) @terms = terms end |
Instance Method Details
#to_lucene ⇒ Object
73 74 75 |
# File 'lib/lucene_query.rb', line 73 def to_lucene @terms.map { |t| t.to_lucene }.join(" #{operator} ").parens end |