Class: Phronomy::Loader::Base
- Inherits:
-
Object
- Object
- Phronomy::Loader::Base
- Defined in:
- lib/phronomy/loader/base.rb
Overview
Abstract base class for document loaders.
A loader converts an external source (file path, URL, etc.) into an Array of document hashes understood by the rest of the pipeline:
[{ text: String, metadata: Hash }, ...]
Subclasses must implement #load.
Direct Known Subclasses
Instance Method Summary collapse
-
#load(source) ⇒ Array<Hash>
Load documents from +source+ and return an array of document hashes.
Instance Method Details
#load(source) ⇒ Array<Hash>
Load documents from +source+ and return an array of document hashes.
19 20 21 |
# File 'lib/phronomy/loader/base.rb', line 19 def load(source) raise NotImplementedError, "#{self.class}#load is not implemented" end |