class Cucumber::Core::EventBus

def on(event_id, handler_object = nil, &handler_proc)

of the event.
 Register for an event. The handler proc will be called back with each of the attributes
def on(event_id, handler_object = nil, &handler_proc)
  handler = handler_proc || handler_object
  validate_handler_and_event_id!(handler, event_id)
  event_class = event_types[event_id]
  handlers_for(event_class) << handler
  broadcast_queued_events_to handler, event_class
end