def register(event_ids, handler_object = nil, &handler_proc)
      handler = handler_proc || handler_object

      fail ArgumentError, 'Please pass either an object#call or a handler block' if handler.nil? || !handler.respond_to?(:call)

      Array(event_ids).flatten.each do |id|
        @handlers[
          @resolver.transform(id).to_s
        ] << handler
      end

      nil
    end
def register(event_ids, handler_object = nil, &handler_proc)
      handler = handler_proc || handler_object

      fail ArgumentError, 'Please pass either an object#call or a handler block' if handler.nil? || !handler.respond_to?(:call)

      Array(event_ids).flatten.each do |id|
        @handlers[
          @resolver.transform(id).to_s
        ] << handler
      end

      nil
    end
Create EventBus

 @param [#transform] resolver
   A resolver which transforms Symbol, String, Class into an event Class.
 Register for an event

 @param [String, Symbol, Class, Array] event_ids
   If Array, register multiple events witht the same handler. If String,
   Symbol, Class register handler for given event.

 @param [#call] handler_object
   The handler object, needs to have method `#call`. Either
   `handler_object` or `block` can be defined. The handler object gets the
   event passed to `#call`.

 @yield
   Handler block which gets the event passed as parameter.