Class: KeywordMatcher::Process

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

Constant Summary collapse

FUZZINESS =
1
MIN_WORD_LENGTH_FOR_FUZZY =
4

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(group, words) ⇒ Process

Returns a new instance of Process.



8
9
10
11
# File 'lib/keyword_matcher/process.rb', line 8

def initialize(group, words)
  @group = group
  @words = words
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



3
4
5
# File 'lib/keyword_matcher/process.rb', line 3

def group
  @group
end

#wordsObject (readonly)

Returns the value of attribute words.



3
4
5
# File 'lib/keyword_matcher/process.rb', line 3

def words
  @words
end

Instance Method Details

#found?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/keyword_matcher/process.rb', line 13

def found?
  in_any?(group.or) && negation_found?.blank?
end