Class: DeprecationHelper::Strategies::LogError
- Inherits:
-
Object
- Object
- DeprecationHelper::Strategies::LogError
- Extended by:
- T::Sig
- Includes:
- BaseStrategyInterface
- Defined in:
- lib/deprecation_helper/strategies/log_error.rb
Instance Method Summary collapse
-
#apply!(message, backtrace) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
-
#initialize(logger: nil) ⇒ LogError
constructor
A new instance of LogError.
Constructor Details
#initialize(logger: nil) ⇒ LogError
Returns a new instance of LogError.
11 12 13 |
# File 'lib/deprecation_helper/strategies/log_error.rb', line 11 def initialize(logger: nil) @logger = T.let(logger || Logger.new(STDOUT), T.untyped) end |
Instance Method Details
#apply!(message, backtrace) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
16 17 18 |
# File 'lib/deprecation_helper/strategies/log_error.rb', line 16 def apply!(, backtrace) # rubocop:disable Lint/UnusedMethodArgument @logger.warn() end |