When I\'m running a simple Ruby script, what\'s the easiest way to dump an object\'s fields to the console?
I\'m looking for something similar to PHP\'s print
print
p object
Ruby doc for p.
p(*args) public For each object, directly writes obj.inspect followed by a newline to the program’s standard output.
p(*args) public
For each object, directly writes obj.inspect followed by a newline to the program’s standard output.