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

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/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 Attribute Summary collapse

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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/fallback_message_formatter.rb', line 10

def initialize(output)
  @output = output
end

Instance Attribute Details

#outputObject (readonly)

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.



15
16
17
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/fallback_message_formatter.rb', line 15

def output
  @output
end

Instance Method Details

#message(notification) ⇒ Object

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

Parameters:

  • notification (MessageNotification)

    containing message



22
23
24
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/fallback_message_formatter.rb', line 22

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