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).
644 645 646 647 648 649 |
# File 'lib/pp.rb', line 644 def pp(*objs) 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.
See the PP module for more information.
637 638 639 |
# File 'lib/pp.rb', line 637 def pretty_inspect PP.pp(self, ''.dup) end |