Class: Object

Inherits:
BasicObject
Defined in:
lib/pretty_debug.rb,
lib/pretty_debug.rb,
lib/pretty_debug.rb

Overview

Terminal

Instance Method Summary collapse

Instance Method Details

#expandObject



270
# File 'lib/pretty_debug.rb', line 270

def expand; inspect.verbatim end

#interceptObject



25
26
27
28
29
30
31
# File 'lib/pretty_debug.rb', line 25

def intercept
  l = caller_location
  tap do puts \
    "[Debug] #{"#{l.realpath}:#{l.lineno}"}".bf.color(:yellow),
    inspect.verbatim
  end
end

#recursive?(known = {}) ⇒ Boolean



219
# File 'lib/pretty_debug.rb', line 219

def recursive? known = {}; false end

#which(m) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/pretty_debug.rb', line 32

def which m
  l = caller_location
  m = :method_missing unless self.class.method_defined?(m)
  mt = method(m)
  tap do puts \
    "[Debug] #{"#{l.realpath}:#{l.lineno}"}".bf.color(:yellow),
    "#{self.class}(#{mt.owner})##{m}@#{mt.source_location.to_a.join(":".freeze)}"
  end
end