Method: Object#debug

Defined in:
lib/ruber/utils.rb

#debug(obj) ⇒ nil Also known as: d

Prints the given object and the position from which the method was called

Parameters:

  • the (Object)

    object to print on screen (its @inspect@ method will be used)

Returns:

  • (nil)


101
102
103
# File 'lib/ruber/utils.rb', line 101

def debug obj
  $stderr.puts "DEBUG(#{caller[0][/^[^:]+:\d+/]}): #{obj.inspect}\n"
end