123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Inherits: Object
Defined in: rspec-core/lib/rspec/core/formatters/fallback_message_formatter.rb

Overview

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

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(output) ⇒ FallbackMessageFormatter

[ GitHub ]

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

def initialize(output)
  @output = output
end

Instance Attribute Details

#output (readonly)

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/formatters/fallback_message_formatter.rb', line 15

attr_reader :output

Instance Method Details

#message(notification)

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

Parameters:

  • notification (MessageNotification)

    containing message

[ GitHub ]

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

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