Module: PrettyTrace

Defined in:
lib/pretty_trace/colors.rb,
lib/pretty_trace/handler.rb,
lib/pretty_trace/version.rb,
lib/pretty_trace/backtrace_item.rb,
lib/pretty_trace/module_methods.rb,
lib/pretty_trace/structured_backtrace.rb

Defined Under Namespace

Modules: Colors Classes: BacktraceItem, Handler, StructuredBacktrace

Constant Summary collapse

VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

.debug_tipObject



19
20
21
# File 'lib/pretty_trace/module_methods.rb', line 19

def debug_tip
  Handler.options[:debug_tip] = true
end

.disableObject



7
8
9
# File 'lib/pretty_trace/module_methods.rb', line 7

def disable
  Handler.disable
end

.enableObject



3
4
5
# File 'lib/pretty_trace/module_methods.rb', line 3

def enable
  Handler.enable unless ENV['PRETTY_TRACE'] == 'off'
end

.filter(filter) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/pretty_trace/module_methods.rb', line 11

def filter(filter)
  if filter.is_a? Array
    Handler.options[:filter] += filter
  else
    Handler.options[:filter] << filter
  end
end

.no_debug_tipObject



23
24
25
# File 'lib/pretty_trace/module_methods.rb', line 23

def no_debug_tip
  Handler.options[:debug_tip] = false
end

.no_reverseObject



39
40
41
# File 'lib/pretty_trace/module_methods.rb', line 39

def no_reverse
  Handler.options[:reverse] = false
end

.no_trimObject



31
32
33
# File 'lib/pretty_trace/module_methods.rb', line 31

def no_trim
  Handler.options[:trim] = false
end

.reverseObject



35
36
37
# File 'lib/pretty_trace/module_methods.rb', line 35

def reverse
  Handler.options[:reverse] = true
end

.trimObject



27
28
29
# File 'lib/pretty_trace/module_methods.rb', line 27

def trim
  Handler.options[:trim] = true
end