Class: RSpec::Rewind::RunnerLogger
- Inherits:
-
Object
- Object
- RSpec::Rewind::RunnerLogger
- Defined in:
- lib/rspec/rewind/runner_logger.rb
Instance Method Summary collapse
- #debug(message) ⇒ Object
-
#initialize(configuration:, warn_output:) ⇒ RunnerLogger
constructor
A new instance of RunnerLogger.
- #reporter_message(message) ⇒ Object
Constructor Details
#initialize(configuration:, warn_output:) ⇒ RunnerLogger
Returns a new instance of RunnerLogger.
6 7 8 9 |
# File 'lib/rspec/rewind/runner_logger.rb', line 6 def initialize(configuration:, warn_output:) @configuration = configuration @warn_output = warn_output end |
Instance Method Details
#debug(message) ⇒ Object
20 21 22 23 24 |
# File 'lib/rspec/rewind/runner_logger.rb', line 20 def debug() return unless @configuration.verbose ("[rspec-rewind] #{message}") end |
#reporter_message(message) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rspec/rewind/runner_logger.rb', line 11 def () if defined?(::RSpec) && ::RSpec.respond_to?(:configuration) reporter = ::RSpec.configuration.reporter reporter&.() end rescue StandardError @warn_output.call() end |