Class: RSpec::Core::Bisect::Notifier

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/bisect/utilities.rb

Overview

Wraps a ‘formatter` providing a simple means to notify it in place of an `RSpec::Core::Reporter`, without involving configuration in any way.

Instance Method Summary collapse

Constructor Details

#initialize(formatter) ⇒ Notifier

Returns a new instance of Notifier.



20
21
22
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/utilities.rb', line 20

def initialize(formatter)
  @formatter = formatter
end

Instance Method Details

#publish(event, *args) ⇒ Object



24
25
26
27
28
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/utilities.rb', line 24

def publish(event, *args)
  return unless @formatter.respond_to?(event)
  notification = Notifications::CustomNotification.for(*args)
  @formatter.__send__(event, notification)
end