Class: LuceneQuery::InfixOperator

Inherits:
Object
  • Object
show all
Defined in:
lib/lucene_query.rb

Direct Known Subclasses

And, Or

Instance Method Summary collapse

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_luceneObject



73
74
75
# File 'lib/lucene_query.rb', line 73

def to_lucene
  @terms.map { |t| t.to_lucene }.join(" #{operator} ").parens
end