class Rambling::Trie::Readers::PlainText

File reader for .txt files.

Public Instance Methods

each_word(filepath) { |chomp!| ... } click to toggle source

Yields each word read from a .txt file. @param [String] filepath the full path of the file to load the words

from.

@yield [String] Each line read from the file.

# File lib/rambling/trie/readers/plain_text.rb, line 12
def each_word filepath
  File.foreach(filepath) { |line| yield line.chomp! }
end