| Class | PP |
| In: |
pp.rb
|
| Parent: | PrettyPrint |
Methods
Included Modules
Attributes
| sharing_detection | [RW] | Returns the sharing detection flag as a boolean value. It is false by default. |
Public Class methods
Outputs obj to out in pretty printed format of width columns in width.
If out is omitted, +$>+ is assumed. If width is omitted, 79 is assumed.
PP.pp returns out.
# File pp.rb, line 67
67: def PP.pp(obj, out=$>, width=79)
68: q = PP.new(out, width)
69: q.guard_inspect_key {q.pp obj}
70: q.flush
71: #$pp = q
72: out << "\n"
73: end
Outputs obj to out like PP.pp but with no indent and newline.
PP.singleline_pp returns out.
# File pp.rb, line 79
79: def PP.singleline_pp(obj, out=$>)
80: q = SingleLine.new(out)
81: q.guard_inspect_key {q.pp obj}
82: q.flush
83: out
84: end