puts

puts(exps) Instance Public methods Concatenates all expressions in this printer, separated by newlines. An Encoding::CompatibilityError is raised of the given exps's encoding doesn't match the previous expression evaluated.

new

new(bind = nil) Class Public methods Creates a new XMP object. The top-level binding or, optional bind parameter will be used when creating the workspace. See WorkSpace.new for more information. This uses the :XMP prompt mode, see Customizing the IRB Prompt at IRB for full detail.

puts

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"

[]

[]( key ) Instance Public methods Return value associated with key from database. Returns nil if there is no such key.

[]=

[]=( key, value ) Instance Public methods Set key to value in database. value will be converted to YAML before storage.

delete

delete( key ) Instance Public methods Deletes value from database associated with key. Returns value or nil.

delete_if

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.

each

each() Instance Public methods Alias for: each_pair

each_pair

each_pair() Instance Public methods Calls the given block once for each key, value pair in the database. Returns self. each

each_value

each_value() Instance Public methods Calls the given block for each value in database. Returns self.