Class Tx::MapBuilder
In: tx.rb
Parent: Object

A class to build an index with key/value pairs.

Methods

add   add_all   build   error_log   new   result_log  

Public Class methods

Creates an map builder.

e.g. builder = Tx::MapBuilder.new

Public Instance methods

Adds one key/value pair to the index.

e.g. builder.add("hoge", "foo")

Adds multiple key/value pairs to the index.

e.g. builder.add_all(["key1", "value1", "key2", "value2"])

Builds an index of pairs added by add and add_all, and save it to a file named file_prefix.key, file_prefix.val and file_prefix.map. The index can be loaded with Tx::Map.new.

e.g. builder.build("test")

Returns error log of index building.

Returns operation log of index building.

[Validate]