Class: Rambling::Trie::Readers::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/rambling/trie/readers/reader.rb

Overview

Base class for all readers.

Direct Known Subclasses

PlainText

Instance Method Summary collapse

Instance Method Details

#each_word(_filepath) {|String| ... } ⇒ self

This method is abstract.

Subclass and override #each_word to fit to a particular file format.

Yields each word read from given file.

Parameters:

  • filepath (String)

    the full path of the file to load the words from.

Yields:

  • (String)

    Each line read from the file.

Returns:

  • (self)

Raises:

  • (NotImplementedError)

    when not overridden by a subclass



16
17
18
# File 'lib/rambling/trie/readers/reader.rb', line 16

def each_word _filepath
  not_implemented
end