Class: Rambling::Trie::Serializers::Serializer
- Inherits:
-
Object
- Object
- Rambling::Trie::Serializers::Serializer
- Defined in:
- lib/rambling/trie/serializers/serializer.rb
Overview
Base class for all serializers.
Instance Method Summary collapse
-
#dump(contents, filepath) ⇒ Numeric
abstract
Dumps contents into a specified filepath.
-
#load(filepath) ⇒ TContents
abstract
Loads contents from a specified filepath.
Instance Method Details
#dump(contents, filepath) ⇒ Numeric
This method is abstract.
Subclass and override #dump to output the desired format.
Dumps contents into a specified filepath.
21 22 23 |
# File 'lib/rambling/trie/serializers/serializer.rb', line 21 def dump contents, filepath raise NotImplementedError end |
#load(filepath) ⇒ TContents
This method is abstract.
Subclass and override #load to parse the desired format.
Loads contents from a specified filepath.
12 13 14 |
# File 'lib/rambling/trie/serializers/serializer.rb', line 12 def load filepath raise NotImplementedError end |