Module: Kernel
- Defined in:
- lib/pp.rb
Class Method Summary collapse
-
.pp(*objs) ⇒ Object
prints arguments in pretty form.
Instance Method Summary collapse
-
#pretty_inspect ⇒ Object
Returns a pretty printed object as a string.
Class Method Details
.pp(*objs) ⇒ Object
prints arguments in pretty form.
pp returns argument(s).
21 22 23 24 25 26 |
# File 'lib/pp.rb', line 21 def pp(*objs) # :nodoc: objs.each {|obj| PP.pp(obj) } objs.size <= 1 ? objs.first : objs end |
Instance Method Details
#pretty_inspect ⇒ Object
Returns a pretty printed object as a string.
In order to use this method you must first require the PP module:
require 'pp'
See the PP module for more information.
13 14 15 |
# File 'lib/pp.rb', line 13 def pretty_inspect PP.pp(self, ''.dup) end |