Class StructuredWarnings::Warner
In: lib/structured_warnings/warner.rb
Parent: Object

The Warner class implements a very simple interface. It simply formats a warning, so it is more than just the message itself. This default warner uses a format comparable to warnings emitted by rb_warn including the place where the "thing that caused the warning" resides.

Methods

format  

Public Instance methods

Warner.new.format(StructuredWarning::DeprecationWarning, "more info..", caller)

   # => "demo.rb:5 : more info.. (StructuredWarning::DeprecationWarning)"

[Validate]