Class: RSpec::Core::Formatters::FallbackMessageFormatter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/core/formatters/fallback_message_formatter.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Formatter for providing message output as a fallback when no other profiler implements #message

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ FallbackMessageFormatter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FallbackMessageFormatter.



10
11
12
# File 'lib/rspec/core/formatters/fallback_message_formatter.rb', line 10

def initialize(output)
  @output = output
end

Instance Method Details

#message(notification) ⇒ void

Used by the reporter to send messages to the output stream.

Parameters:

  • notification (MessageNotification)

    containing message



22
23
24
# File 'lib/rspec/core/formatters/fallback_message_formatter.rb', line 22

def message(notification)
  output.puts notification.message
end