def register_bundle_metadata_reducer(mime_type, key, *args, &block)
      case args.size
      when 0
        reducer = block
      when 1
        if block_given?
          initial = args[0]
          reducer = block
        else
          initial = nil
          reducer = args[0].to_proc
        end
      when 2
        initial = args[0]
        reducer = args[1].to_proc
      else
        raise ArgumentError, "wrong number of arguments (#{args.size} for 0..2)"
      end

      self.config = hash_reassoc(config, :bundle_reducers, mime_type) do |reducers|
        reducers.merge(key => [initial, reducer])
      end
    end
def register_bundle_metadata_reducer(mime_type, key, *args, &block)
      case args.size
      when 0
        reducer = block
      when 1
        if block_given?
          initial = args[0]
          reducer = block
        else
          initial = nil
          reducer = args[0].to_proc
        end
      when 2
        initial = args[0]
        reducer = args[1].to_proc
      else
        raise ArgumentError, "wrong number of arguments (#{args.size} for 0..2)"
      end

      self.config = hash_reassoc(config, :bundle_reducers, mime_type) do |reducers|
        reducers.merge(key => [initial, reducer])
      end
    end
Public: Register bundle metadata reducer function.

 Examples

   Sprockets.register_bundle_metadata_reducer 'application/javascript', :jshint_errors, [], :+

   Sprockets.register_bundle_metadata_reducer 'text/css', :selector_count, 0 { |total, count|
     total + count
   }

 mime_type - String MIME Type. Use '*/*' applies to all types.
 key       - Symbol metadata key
 initial   - Initial memo to pass to the reduce funciton (default: nil)
 block     - Proc accepting the memo accumulator and current value

 Returns nothing.