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<Readers::Reader>
readonly
The configured Readers.
-
#root_builder ⇒ Proc<Nodes::Node>
The configured
root_builder
, which returns a Node when called. -
#serializers ⇒ ProviderCollection<Serializers::Serializer>
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 ⇒ void
Resets back to default properties.
Constructor Details
#initialize ⇒ Properties
Returns a new properties instance.
29 30 31 |
# File 'lib/rambling/trie/configuration/properties.rb', line 29 def initialize reset end |
Instance Attribute Details
#compressor ⇒ Compressor
The configured Compressor.
18 19 20 |
# File 'lib/rambling/trie/configuration/properties.rb', line 18 def compressor @compressor end |
#readers ⇒ ProviderCollection<Readers::Reader>
The configured Readers.
10 11 12 |
# File 'lib/rambling/trie/configuration/properties.rb', line 10 def readers @readers end |
#root_builder ⇒ Proc<Nodes::Node>
The configured root_builder
, which returns a Node when called.
22 23 24 |
# File 'lib/rambling/trie/configuration/properties.rb', line 22 def root_builder @root_builder end |
#serializers ⇒ ProviderCollection<Serializers::Serializer>
The configured Serializers.
14 15 16 |
# File 'lib/rambling/trie/configuration/properties.rb', line 14 def serializers @serializers end |
#tmp_path ⇒ String
The configured tmp_path
, which will be used for throwaway files.
26 27 28 |
# File 'lib/rambling/trie/configuration/properties.rb', line 26 def tmp_path @tmp_path end |
Instance Method Details
#reset ⇒ void
This method returns an undefined value.
Resets back to default properties.
35 36 37 38 39 40 41 42 |
# File 'lib/rambling/trie/configuration/properties.rb', line 35 def reset reset_readers reset_serializers @compressor = Rambling::Trie::Compressor.new @root_builder = -> { Rambling::Trie::Nodes::Raw.new } @tmp_path = '/tmp' end |