Module: Kernel
- Defined in:
- lib/debugging.rb
Instance Method Summary collapse
Instance Method Details
#dbg_match(msg, lnb, debug:) ⇒ Object
12 13 14 15 |
# File 'lib/debugging.rb', line 12 def dbg_match(msg, lnb, debug:) designation = name.split("::").last.downcase debug__(msg: "#{lnb.succ}: #{msg} match in :#{designation}", debug:) end |
#debug__(subject = nil, msg: nil, rtrn: nil, debug:) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/debugging.rb', line 4 def debug__(subject=nil, msg: nil, rtrn: nil, debug:) return rtrn || subject unless debug $stderr.puts(msg) if msg $stderr.puts(subject.inspect) if subject rtrn || subject end |