Class: WarningSigns::Behavior::Raise

Inherits:
Base
  • Object
show all
Defined in:
lib/warning_signs/behavior/raise.rb

Instance Attribute Summary

Attributes inherited from Base

#backtrace, #message, #message_formatter

Instance Method Summary collapse

Methods inherited from Base

for, #formatted_message, #initialize

Constructor Details

This class inherits a constructor from WarningSigns::Behavior::Base

Instance Method Details

#emitObject



9
10
11
12
13
# File 'lib/warning_signs/behavior/raise.rb', line 9

def emit
  raise UnhandledDeprecationError,
    formatted_message.first,
    filtered_backtrace[1..].map(&:to_s)
end

#filtered_backtraceObject



4
5
6
7
# File 'lib/warning_signs/behavior/raise.rb', line 4

def filtered_backtrace
  return backtrace if message_formatter.backtrace_lines.zero?
  message_formatter.filtered_backtrace(backtrace)
end