def register(command, aggregate_class = nil, &block)
      raise ArgumentError, 'Pass either aggregate class or block' if aggregate_class && block
      handler = aggregate_class || block
      @routes[command] = handler
    end
def register(command, aggregate_class = nil, &block)
      raise ArgumentError, 'Pass either aggregate class or block' if aggregate_class && block
      handler = aggregate_class || block
      @routes[command] = handler
    end
Registers a handler.

 As a result, when `#route!` is called for that command, the aggregate will be
 loaded from repository, the command will be sent to the object to invoke the
 object's method, and finally the aggregate will be saved.