Sha256: 3df85335c5be47ab9dc18e781f64586d02e691479ff7cc6255227341429bb48b
Contents?: true
Size: 429 Bytes
Versions: 8
Compression:
Stored size: 429 Bytes
Contents
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
Version data entries
8 entries across 8 versions & 5 rubygems