Module: Pry::Warning Private
- Defined in:
- lib/pry/warning.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.
Class Method Summary collapse
-
.warn(message) ⇒ void
private
Prints a warning message with exact file and line location, similar to how Ruby’s -W prints warnings.
Class Method Details
.warn(message) ⇒ void
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.
This method returns an undefined value.
Prints a warning message with exact file and line location, similar to how Ruby’s -W prints warnings.
12 13 14 15 16 17 18 |
# File 'lib/pry/warning.rb', line 12 def self.warn() location = caller_locations(2..2).first path = location.path lineno = location.lineno Kernel.warn("#{path}:#{lineno}: warning: #{}") end |