module LightService::Deprecation
Public Class Methods
warn(message, callstack = caller)
click to toggle source
Basic implementation of a deprecation warning
# File lib/light-service/deprecation_warning.rb, line 5 def warn(message, callstack = caller) # Construct the warning message warning_message = "DEPRECATION WARNING: #{message}\n" warning_message += "Called from: #{callstack.first}\n" unless callstack.empty? # Output the warning message to stderr or a log file warn warning_message # Additional logging or actions can be added here end