Class: Rambling::Trie::Configuration::Properties
- Inherits:
-
Object
- Object
- Rambling::Trie::Configuration::Properties
- Defined in:
- lib/rambling/trie/configuration/properties.rb
Overview
Provides configurable properties for Rambling::Trie.
Instance Attribute Summary collapse
-
#compressor ⇒ Compressor
The configured Compressor.
-
#readers ⇒ ProviderCollection
readonly
The configured Readers.
-
#root_builder ⇒ Proc<Nodes::Node>
The configured root_builder, which should return a Node when called.
-
#serializers ⇒ ProviderCollection
readonly
The configured Serializers.
-
#tmp_path ⇒ String
The configured tmp_path, which will be used for throwaway files.
Instance Method Summary collapse
-
#initialize ⇒ Properties
constructor
Returns a new properties instance.
-
#reset ⇒ Object
Resets back to default properties.
Constructor Details
#initialize ⇒ Properties
Returns a new properties instance.
32 33 34 |
# File 'lib/rambling/trie/configuration/properties.rb', line 32 def initialize reset end |
Instance Attribute Details
#compressor ⇒ Compressor
The configured Compressor.
20 21 22 |
# File 'lib/rambling/trie/configuration/properties.rb', line 20 def compressor @compressor end |
#readers ⇒ ProviderCollection
The configured Readers.
11 12 13 |
# File 'lib/rambling/trie/configuration/properties.rb', line 11 def readers @readers end |
#root_builder ⇒ Proc<Nodes::Node>
The configured root_builder, which should return a Node
when called.
25 26 27 |
# File 'lib/rambling/trie/configuration/properties.rb', line 25 def root_builder @root_builder end |
#serializers ⇒ ProviderCollection
The configured Serializers.
16 17 18 |
# File 'lib/rambling/trie/configuration/properties.rb', line 16 def serializers @serializers end |
#tmp_path ⇒ String
The configured tmp_path, which will be used for throwaway files.
29 30 31 |
# File 'lib/rambling/trie/configuration/properties.rb', line 29 def tmp_path @tmp_path end |
Instance Method Details
#reset ⇒ Object
Resets back to default properties.
37 38 39 40 41 42 43 44 |
# File 'lib/rambling/trie/configuration/properties.rb', line 37 def reset reset_readers reset_serializers @compressor = Rambling::Trie::Compressor.new @root_builder = -> { Rambling::Trie::Nodes::Raw.new } @tmp_path = '/tmp' end |