Module: LightService::Deprecation
- Defined in:
- lib/light-service/deprecation_warning.rb
Class Method Summary collapse
-
.warn(message, callstack = caller) ⇒ Object
Basic implementation of a deprecation warning.
Class Method Details
.warn(message, callstack = caller) ⇒ Object
Basic implementation of a deprecation warning
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/light-service/deprecation_warning.rb', line 5 def warn(, callstack = caller) # Construct the warning message = "DEPRECATION WARNING: #{message}\n" += "Called from: #{callstack.first}\n" unless callstack.empty? # Output the warning message to stderr or a log file Kernel.warn # Additional logging or actions can be added here end |