to_a

to_a() Instance Public methods Converts the contents of the database to an array of [key, value] arrays, and returns it.

to_hash

to_hash() Instance Public methods Converts the contents of the database to an in-memory Hash object, and returns it.

update

update( hsh ) Instance Public methods Updates the database with multiple values from the specified object. Takes any object which implements the #each_pair method, including Hash and DBM objects. Returns self.

values

values() Instance Public methods Returns an array of values from the database.

values_at

values_at( *keys ) Instance Public methods Returns an array containing the values associated with the given keys.

new

initialize( file_name, yaml_opts = {} ) Class Public methods Creates a new YAML::Store object, which will store data in file_name. If the file does not already exist, it will be created. Options passed in through yaml_opts will be used when converting the store to YAML via Object#to_yaml.

deflate

Zlib.deflate(string[, level])Zlib::Deflate.deflate(string[, level]) Class Public methods Compresses the given string. Valid values of level are Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9 (the default is 6). This method is almost equivalent to the following code: def deflate(string, level) z = Zlib::Deflate.new(level) dst = z.deflate(string, Zlib::FINISH) z.close dst end See also Zlib.inflate

new

Zlib::Deflate.new(level=DEFAULT_COMPRESSION, window_bits=MAX_WBITS, mem_level=DEF_MEM_LEVEL, strategy=DEFAULT_STRATEGY) Class Public methods Creates a new deflate stream for compression. If a given argument is nil, the default value of that argument is used. The level sets the compression level for the deflate stream between 0 (no compression) and 9 (best compression. The following constants have been defined to make code more readable: Zlib::NO_COMPRESSION = 0 Zlib::BEST_SPEED

<<

Instance Public methods Inputs string into the deflate stream just like #deflate, but returns the Zlib::Deflate object itself. The output from the stream is preserved in output buffer.

deflate 2

z.deflate(string, flush = Zlib::NO_FLUSH) â Stringz.deflate(string, flush = Zlib::NO_FLUSH) { |chunk| ... } â nil Instance Public methods Inputs string into the deflate stream and returns the output from the stream. On calling this method, both the input and the output buffers of the stream are flushed. If string is nil, this method finishes the stream, just like Zlib::ZStream#finish. If a block is given consecutive deflated chunks from the string are yielded to