Class: FuzzyMatch::Rule::StopWord

Inherits:
FuzzyMatch::Rule show all
Defined in:
lib/fuzzy_match/rule/stop_word.rb

Overview

A stop word is ignored

Instance Attribute Summary

Attributes inherited from FuzzyMatch::Rule

#regexp

Instance Method Summary collapse

Methods inherited from FuzzyMatch::Rule

#==, #initialize

Constructor Details

This class inherits a constructor from FuzzyMatch::Rule

Instance Method Details

#apply!(str) ⇒ Object

Destructively remove stop words from the string



6
7
8
# File 'lib/fuzzy_match/rule/stop_word.rb', line 6

def apply!(str)
  str.gsub! regexp, ''
end