Module: Alba::Deprecation Private

Defined in:
lib/alba/deprecation.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Module for printing deprecation warning

Class 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

Parameters:

  • message (String)

    main message to print

Returns:

  • void



11
12
13
14
# File 'lib/alba/deprecation.rb', line 11

def warn(message)
  Kernel.warn(message)
  Kernel.warn(caller_locations(2..2).first) # For performance reason we use (2..2).first
end