class XMP

def initialize(bind = nil)

full detail.
This uses the +:XMP+ prompt mode, see IRB@Customizing+the+IRB+Prompt for

creating the workspace. See WorkSpace.new for more information.
The top-level binding or, optional +bind+ parameter will be used when

Creates a new XMP object.
def initialize(bind = nil)
  IRB.init_config(nil)
  IRB.conf[:PROMPT_MODE] = :XMP
  bind = IRB::Frame.top(1) unless bind
  ws = IRB::WorkSpace.new(bind)
  @io = StringInputMethod.new
  @irb = IRB::Irb.new(ws, @io)
  @irb.context.ignore_sigint = false
  IRB.conf[:MAIN_CONTEXT] = @irb.context
end