Class: 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



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

def expand; inspect.verbatim end

#inspectObject



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

def inspect; "".freeze end

#interceptObject



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

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

#recursive?Boolean

Returns:

  • (Boolean)


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

def recursive? *; false end

#which(m) ⇒ Object



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

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