Class: PrettyTrace::Handler
- Inherits:
-
Object
- Object
- PrettyTrace::Handler
- Extended by:
- Colors
- Defined in:
- lib/pretty_trace/handler.rb
Class Attribute Summary collapse
Class Method Summary collapse
Methods included from Colors
Class Attribute Details
.options ⇒ Object
33 34 35 |
# File 'lib/pretty_trace/handler.rb', line 33 def @options ||= end |
Class Method Details
.debug_tip? ⇒ Boolean
29 30 31 |
# File 'lib/pretty_trace/handler.rb', line 29 def debug_tip? !!([:debug_tip] and ENV['PRETTY_TRACE'] != 'full') end |
.disable ⇒ Object
21 22 23 |
# File 'lib/pretty_trace/handler.rb', line 21 def disable @enabled = false end |
.enable ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pretty_trace/handler.rb', line 8 def enable @enabled = true # :nocov: - this is actually covered through an external process at_exit do if @enabled && $! && !ignored.include?($!.class) show_errors $! $stderr.reopen IO::NULL $stdout.reopen IO::NULL end end # :nocov: end |
.enabled? ⇒ Boolean
25 26 27 |
# File 'lib/pretty_trace/handler.rb', line 25 def enabled? @enabled end |