Module: LunchMoney::Deprecate
- Included in:
- Calls::RecurringExpenses
- Defined in:
- lib/lunchmoney/deprecate.rb
Instance Method Summary collapse
Instance Method Details
#deprecate_endpoint(replacement = nil, level: :warning) ⇒ void
This method returns an undefined value.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lunchmoney/deprecate.rb', line 9 def deprecate_endpoint(replacement = nil, level: :warning) return unless endpoint_deprecation_warnings return if ENV["SILENCE_LUNCHMONEY_DEPRECATIONS"] == "true" = if replacement.nil? "There is currently no replacement for this endpoint" else "Please use #{replacement} instead" end endpoint_name = deprecated_endpoint = "#{endpoint_name} is deprecated and may be removed from LunchMoney | #{}" log_deprecation(, level, endpoint_name, replacement) end |