def add_collector(collector_class)
      return collector_class.each { |c| add_collector(c) } if collector_class.is_a? Array


      raise ArgumentError, "`collector_class' must be a class" unless collector_class.is_a? Class

      unless collector_class.included_modules.include?(Rack::WebProfiler::Collector::DSL)
        raise ArgumentError, "#{collector_class.class.name} must be an instance of \"Rack::WebProfiler::Collector::DSL\""
      end

      definition = collector_class.definition

      if definition_by_identifier(definition.identifier)
        raise ArgumentError, "A collector with identifier \“#{definition.identifier}\" already exists"
      end

      return false unless definition.is_enabled?

      @collectors[collector_class] = definition

      sort_collectors!
    end
def add_collector(collector_class)
      return collector_class.each { |c| add_collector(c) } if collector_class.is_a? Array


      raise ArgumentError, "`collector_class' must be a class" unless collector_class.is_a? Class

      unless collector_class.included_modules.include?(Rack::WebProfiler::Collector::DSL)
        raise ArgumentError, "#{collector_class.class.name} must be an instance of \"Rack::WebProfiler::Collector::DSL\""
      end

      definition = collector_class.definition

      if definition_by_identifier(definition.identifier)
        raise ArgumentError, "A collector with identifier \“#{definition.identifier}\" already exists"
      end

      return false unless definition.is_enabled?

      @collectors[collector_class] = definition

      sort_collectors!
    end
Add a collector.

 @param collector_class [Array, Class]

 @raise [ArgumentError] if `collector_class' is not a Class or is not an instance of Rack::WebProfiler::Collector::DSL
   or a collector with this identifier is already registrered.