Class: RediSearch::Search::Clauses::Slop

Inherits:
ApplicationClause show all
Defined in:
lib/redi_search/search/clauses/slop.rb

Instance Method Summary collapse

Methods inherited from ApplicationClause

#clause_order, clause_order, clause_term

Methods included from Validatable

included, #validate!

Constructor Details

#initialize(slop:) ⇒ Slop

Returns a new instance of Slop.



10
11
12
# File 'lib/redi_search/search/clauses/slop.rb', line 10

def initialize(slop:)
  @slop = slop
end

Instance Method Details

#clauseObject



14
15
16
17
18
# File 'lib/redi_search/search/clauses/slop.rb', line 14

def clause
  validate!

  ["SLOP", slop]
end