has_value?( val ) Instance Public methods Returns true if specified value is found in the database.
fetch( key, ifnone = nil )fetch( key, &block ) Instance Public methods Return value associated with key. If there is no value for key and no block is given, returns ifnone. Otherwise, calls block passing in the given key.
each_value() Instance Public methods Calls the given block for each value in database. Returns self.
each_pair() Instance Public methods Calls the given block once for each key, value pair in the database. Returns self. each
each() Instance Public methods Alias for: each_pair
delete_if() Instance Public methods Calls the given block once for each key, value pair in the database. Deletes all entries for which the block returns true. Returns self.
delete( key ) Instance Public methods Deletes value from database associated with key. Returns value or nil.
[]=( key, value ) Instance Public methods Set key to value in database. value will be converted to YAML before storage.
[]( key ) Instance Public methods Return value associated with key from database. Returns nil if there is no such key.
puts(exps) Instance Public methods Evaluates the given exps, for example: require 'irb/xmp' x = XMP.new x.puts '{:a => 1, :b => 2, :c => 3}' #=> {:a => 1, :b => 2, :c => 3} # ==>{:a=>1, :b=>2, :c=>3} x.puts 'foo = "bar"' # => foo = "bar" # ==>"bar"
Page 413 of 2275