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(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(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( key ) Instance Public methods Deletes value from database associated with key. Returns value or nil.
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() Instance Public methods Alias for: 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() Instance Public methods Calls the given block for each value in database. Returns self.
Page 1919 of 11844