Module: Alba::Deprecation
- Defined in:
- lib/alba/deprecation.rb,
sig/alba/deprecation.rbs
Overview
Module for printing deprecation warning
Class Method Summary collapse
-
.warn(message) ⇒ Object
private
Similar to #warn but prints caller as well.
Instance Method Summary collapse
Class Method Details
.warn(message) ⇒ Object
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.
Similar to #warn but prints caller as well
11 12 13 14 |
# File 'lib/alba/deprecation.rb', line 11 def warn() Kernel.warn() Kernel.warn(caller_locations(2..2).first) # For performance reason we use (2..2).first end |
Instance Method Details
#caller_locations ⇒ Array[Thread::Backtrace::Location]
5 |
# File 'sig/alba/deprecation.rbs', line 5
def caller_locations: (Range[Integer]) -> Array[Thread::Backtrace::Location]
|
#self?.warn ⇒ nil
4 |
# File 'sig/alba/deprecation.rbs', line 4
def self?.warn: (_ToS message) -> nil
|