Module: Aker::Deprecation
- Defined in:
- lib/aker/deprecation.rb
Overview
Defines deprecation warnings and errors for pieces of the library which are being phased out.
This is an internal API in Aker. If there's a use for it outside, it could be factored out.
Defined Under Namespace
Classes: ObsoleteError, StderrMode
Class Attribute Summary collapse
-
.mode ⇒ #report
An object which determines what will happen to the messages generated by notify.
Class Method Summary collapse
-
.notify(message, version)
Indicates that the method it was called from is deprecated and could be removed as of the specified version.
Class Attribute Details
.mode ⇒ #report
An object which determines what will happen to the messages generated by notify. It should respond to one method; see StderrMode for details.
The default is an instance of StderrMode.
21 22 23 |
# File 'lib/aker/deprecation.rb', line 21 def mode @mode end |
Class Method Details
.notify(message, version)
This method returns an undefined value.
Indicates that the method it was called from is deprecated and could be removed as of the specified version.
32 33 34 35 36 37 38 |
# File 'lib/aker/deprecation.rb', line 32 def notify(, version) level = determine_level(version) mode.report(level, (level, , version, caller[1].split('/').last.split(':')[0,2].join(':')), version) end |