Top Level Namespace
Defined Under Namespace
Classes: Mostash
Constant Summary collapse
- MoStash =
Mostash
Instance Method Summary collapse
Instance Method Details
#dbg(obj, msg = nil) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/mostash.rb', line 6 def dbg(obj, msg=nil) file, line, method_raw = caller[0].split('/').last.split(':') method = method_raw.match(/^in `(.+)'/)[1] #puts "#{method} (#{file}##{line}): #{msg}" msg += " " if msg puts "#{msg}#{obj.inspect}" obj end |