Method: Utils::IRB::Service.start

Defined in:
lib/utils/irb.rb

.start(hostname = nil, port = nil, &block) ⇒ Object



449
450
451
452
453
454
455
456
# File 'lib/utils/irb.rb', line 449

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