Sha256: 8d7631b9e0fd2ddd51884e347171ab69c060d239f7885624a2e2c8e156d53985
Contents?: true
Size: 504 Bytes
Versions: 1
Compression:
Stored size: 504 Bytes
Contents
module HarmoniousDictionary module RsegEngine LETTER_SYMBOLS = ('a'..'z').to_a + ('A'..'Z').to_a class English < Engine def initialize @word = '' super end 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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
harmonious_dictionary-0.0.1 | lib/harmonious_dictionary/engines/english.rb |