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. :reek:TooManyInstanceVariables { max_instance_variables: 5 }
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.
30 31 32 |
# File 'lib/rambling/trie/configuration/properties.rb', line 30 def initialize reset end |
Instance Attribute Details
#compressor ⇒ Compressor
The configured Compressor.
19 20 21 |
# File 'lib/rambling/trie/configuration/properties.rb', line 19 def compressor @compressor end |
#readers ⇒ ProviderCollection<Readers::Reader>
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 returns a Node when called.
23 24 25 |
# File 'lib/rambling/trie/configuration/properties.rb', line 23 def root_builder @root_builder end |
#serializers ⇒ ProviderCollection<Serializers::Serializer>
The configured Serializers.
15 16 17 |
# File 'lib/rambling/trie/configuration/properties.rb', line 15 def serializers @serializers end |
#tmp_path ⇒ String
The configured ‘tmp_path`, which will be used for throwaway files.
27 28 29 |
# File 'lib/rambling/trie/configuration/properties.rb', line 27 def tmp_path @tmp_path end |
Instance Method Details
#reset ⇒ void
This method returns an undefined value.
Resets back to default properties.
36 37 38 39 40 41 42 43 |
# File 'lib/rambling/trie/configuration/properties.rb', line 36 def reset reset_readers reset_serializers @compressor = Rambling::Trie::Compressor.new @root_builder = -> { Rambling::Trie::Nodes::Raw.new } @tmp_path = '/tmp' end |