class Muwu::ProjectExceptionHandler::Fatal
Public Class Methods
new(exceptions)
click to toggle source
# File lib/muwu/project_exception_handler/fatal.rb, line 6 def initialize(exceptions) @exceptions = [exceptions].flatten render_exceptions exit end
Public Instance Methods
render_exception(exception)
click to toggle source
# File lib/muwu/project_exception_handler/fatal.rb, line 13 def render_exception(exception) $stderr.puts "- #{exception.class}" $stderr.puts " #{exception.report}" end
render_exceptions()
click to toggle source
# File lib/muwu/project_exception_handler/fatal.rb, line 19 def render_exceptions render_header @exceptions.each do |exception| render_exception(exception) end render_lf end
render_header()
click to toggle source
# File lib/muwu/project_exception_handler/fatal.rb, line 28 def render_header $stderr.puts "#{self.inspect}" end
render_lf()
click to toggle source
# File lib/muwu/project_exception_handler/fatal.rb, line 33 def render_lf $stderr.puts "\n" end