Class: Rambling::Trie::Readers::PlainText
- Inherits:
-
Object
- Object
- Rambling::Trie::Readers::PlainText
- Defined in:
- lib/rambling/trie/readers/plain_text.rb
Overview
File reader for .txt files.
Instance Method Summary collapse
-
#each_word(filepath) {|String| ... } ⇒ Object
Yields each word read from a .txt file.
Instance Method Details
#each_word(filepath) {|String| ... } ⇒ Object
Yields each word read from a .txt file.
12 13 14 |
# File 'lib/rambling/trie/readers/plain_text.rb', line 12 def each_word filepath File.foreach(filepath) { |line| yield line.chomp! } end |