module Utils::IRB::Service

def start(hostname = nil, port = nil, &block)

def start(hostname = nil, port = nil, &block)
  hostname ||= self.hostname
  port     ||= self.port
  block    ||= proc {}
  uri = "druby://#{hostname}:#{port}"
  puts "Starting IRB server listening to #{uri.inspect}."
  DRb.start_service(uri, eval('irb_current_working_binding', block.binding))
end