Sha256: 39e750fffb99833ff31caa82f21e2af1bcb83c419222fa7c885b933c53eb2499
Contents?: true
Size: 443 Bytes
Versions: 1
Compression:
Stored size: 443 Bytes
Contents
module Rambling module Trie module Readers # File reader for .txt files. class PlainText # 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. def each_word filepath File.foreach(filepath) { |line| yield line.chomp! } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rambling-trie-1.0.3 | lib/rambling/trie/readers/plain_text.rb |