I'm trying to find info on the p method in Ruby. It seems to produce internal info on the properties of a class but when I try to search for it I get every word that has the letter p in it.
+9
A:
Have you seen the api doc page? http://www.ruby-doc.org/core/classes/Kernel.html#M006002
DanSingerman
2009-03-08 17:04:24
Cool. I didn't know it was in the Kernel. Thanks.
2009-03-08 17:07:38
+5
A:
Each method you can call "directly", e.g: print, p, abort, puts, readline, etc., is located in the Kernel class.
(Kernel.methods - Object.methods).sort.each do |method|
puts method
end
Geo
2009-03-08 17:08:28