class RSpec::Core::Formatters::DeprecationFormatter

@private

def deprecation(notification)

def deprecation(notification)
  return if @seen_deprecations.include? notification
  @count += 1
  printer.print_deprecation_message notification
  @seen_deprecations << notification
end

def deprecation_message_for(data)

def deprecation_message_for(data)
  if data.message
    SpecifiedDeprecationMessage.new(data)
  else
    GeneratedDeprecationMessage.new(data)
  end
end

def deprecation_summary(notification)

def deprecation_summary(notification)
  printer.deprecation_summary
end

def initialize(deprecation_stream, summary_stream)

def initialize(deprecation_stream, summary_stream)
  @deprecation_stream = deprecation_stream
  @summary_stream = summary_stream
  @seen_deprecations = Set.new
  @count = 0
end

def printer

def printer
  @printer ||= case deprecation_stream
               when File
                 ImmediatePrinter.new(FileStream.new(deprecation_stream), summary_stream, self)
               when RaiseErrorStream
                 ImmediatePrinter.new(deprecation_stream, summary_stream, self)
               else
                 DelayedPrinter.new(deprecation_stream, summary_stream, self)
               end
end