Class: HarmoniousDictionary::RsegEngine::English
- Defined in:
- lib/harmonious_dictionary/engines/english.rb
Instance Method Summary collapse
-
#initialize ⇒ English
constructor
A new instance of English.
- #process(char) ⇒ Object
Methods inherited from Engine
Constructor Details
#initialize ⇒ English
Returns a new instance of English.
8 9 10 11 |
# File 'lib/harmonious_dictionary/engines/english.rb', line 8 def initialize @word = '' super end |
Instance Method Details
#process(char) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/harmonious_dictionary/engines/english.rb', line 13 def process(char) match = false word = nil if LETTER_SYMBOLS.include?(char) @word << char match = true else word = @word @word = '' match = false end [match, word] end |