lib/rambling/trie/configuration/properties.rb in rambling-trie-1.0.2 vs lib/rambling/trie/configuration/properties.rb in rambling-trie-1.0.3
- old
+ new
@@ -15,15 +15,17 @@
# The configured {Compressor Compressor}.
# @return [Compressor] the configured compressor.
attr_accessor :compressor
- # The configured root_builder, which should return a {Node Node} when
- # called.
- # @return [Proc<Node>] the configured root_builder.
+ # The configured root_builder, which should return a {Nodes::Node Node} when
+ # called.
+ # @return [Proc<Nodes::Node>] the configured root_builder.
attr_accessor :root_builder
+ # The configured tmp_path, which will be used for throwaway files.
+ # @return [String] the configured tmp_path.
attr_accessor :tmp_path
# Returns a new properties instance.
def initialize
reset
@@ -33,29 +35,29 @@
def reset
reset_readers
reset_serializers
self.compressor = Rambling::Trie::Compressor.new
- self.root_builder = lambda { Rambling::Trie::RawNode.new }
+ self.root_builder = lambda { Rambling::Trie::Nodes::Raw.new }
self.tmp_path = '/tmp'
end
private
attr_writer :readers, :serializers
def reset_readers
plain_text_reader = Rambling::Trie::Readers::PlainText.new
- self.readers = Rambling::Trie::Configuration::ProviderCollection.new 'reader', txt: plain_text_reader
+ self.readers = Rambling::Trie::Configuration::ProviderCollection.new :reader, txt: plain_text_reader
end
def reset_serializers
marshal_serializer = Rambling::Trie::Serializers::Marshal.new
yaml_serializer = Rambling::Trie::Serializers::Yaml.new
zip_serializer = Rambling::Trie::Serializers::Zip.new self
- self.serializers = Rambling::Trie::Configuration::ProviderCollection.new 'serializer',
+ self.serializers = Rambling::Trie::Configuration::ProviderCollection.new :serializer,
marshal: marshal_serializer,
yml: yaml_serializer,
yaml: yaml_serializer,
zip: zip_serializer
end