Class | Matcher |
In: |
lib/more/facets/matcher.rb
|
Parent: | Object |
Matcher derives from Ruby Quiz #103, the DictionaryMatcher quiz.
word_count | [R] |
Determines whether one of the words in the DictionaryMatcher is a substring of string. Returns the index of the match if found, nil if not found.
Determine whether one of the words in the DictionaryMatcher is a substring of string. Returns a DictionaryMatcher::MatchData object if found, nil if not found.
Scans string for all occurrances of strings in the DictionaryMatcher. Overlapping matches are skipped (only the first one is yielded), and when some strings in the DictionaryMatcher are substrings of others, only the shortest match at a given position is found.