diff options
Diffstat (limited to 'lib/pp.rb')
-rw-r--r-- | lib/pp.rb | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -46,8 +46,16 @@ require 'prettyprint' module Kernel + # returns a pretty printed object as a string. + def pretty_inspect + PP.pp(self, '') + end + private - def pp(*objs) + # prints arguments in pretty form. + # + # pp returns nil. + def pp(*objs) # :doc: objs.each {|obj| PP.pp(obj) } |