Class: RSpec::Risky::RedundantPrintConfig
- Inherits:
-
RuleConfig
- Object
- RuleConfig
- RSpec::Risky::RedundantPrintConfig
- Defined in:
- lib/rspec/risky/configuration.rb,
sig/rspec/risky.rbs
Constant Summary collapse
- VALID_CAPTURE =
%i[stdout stderr both].freeze
Constants inherited from RuleConfig
RSpec::Risky::RuleConfig::VALID_SEVERITIES
Instance Attribute Summary collapse
-
#allow_warn ⇒ Boolean
Returns the value of attribute allow_warn.
-
#capture ⇒ Symbol
Returns the value of attribute capture.
-
#capture_loggers ⇒ Boolean
Returns the value of attribute capture_loggers.
-
#logger_ignore_paths ⇒ Array[String]
Returns the value of attribute logger_ignore_paths.
-
#passthrough ⇒ Boolean
Returns the value of attribute passthrough.
-
#strict ⇒ Boolean
Returns the value of attribute strict.
Attributes inherited from RuleConfig
Instance Method Summary collapse
- #captures?(stream_name) ⇒ Boolean
- #captures_logger?(path) ⇒ Boolean
-
#initialize ⇒ RedundantPrintConfig
constructor
A new instance of RedundantPrintConfig.
Constructor Details
#initialize ⇒ RedundantPrintConfig
Returns a new instance of RedundantPrintConfig.
76 77 78 79 80 81 82 83 84 |
# File 'lib/rspec/risky/configuration.rb', line 76 def initialize super @capture = :both @allow_warn = false @capture_loggers = false @logger_ignore_paths = ["log/test.log"] @passthrough = true @strict = false end |
Instance Attribute Details
#allow_warn ⇒ Boolean
Returns the value of attribute allow_warn.
73 74 75 |
# File 'lib/rspec/risky/configuration.rb', line 73 def allow_warn @allow_warn end |
#capture ⇒ Symbol
Returns the value of attribute capture.
74 75 76 |
# File 'lib/rspec/risky/configuration.rb', line 74 def capture @capture end |
#capture_loggers ⇒ Boolean
Returns the value of attribute capture_loggers.
73 74 75 |
# File 'lib/rspec/risky/configuration.rb', line 73 def capture_loggers @capture_loggers end |
#logger_ignore_paths ⇒ Array[String]
Returns the value of attribute logger_ignore_paths.
73 74 75 |
# File 'lib/rspec/risky/configuration.rb', line 73 def logger_ignore_paths @logger_ignore_paths end |
#passthrough ⇒ Boolean
Returns the value of attribute passthrough.
73 74 75 |
# File 'lib/rspec/risky/configuration.rb', line 73 def passthrough @passthrough end |
#strict ⇒ Boolean
Returns the value of attribute strict.
73 74 75 |
# File 'lib/rspec/risky/configuration.rb', line 73 def strict @strict end |
Instance Method Details
#captures?(stream_name) ⇒ Boolean
95 96 97 |
# File 'lib/rspec/risky/configuration.rb', line 95 def captures?(stream_name) capture == :both || capture == stream_name.to_sym end |
#captures_logger?(path) ⇒ Boolean
99 100 101 |
# File 'lib/rspec/risky/configuration.rb', line 99 def captures_logger?(path) capture_loggers && !ignored_logger_path?(path) end |