Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > ppライブラリ > PPクラス > pp
pp(obj, out = $>, width = 79) -> object[permalink][rdoc]指定されたオブジェクト obj を出力先 out に幅 width で出力します。 出力先 out を返します。
str = PP.pp([[:a, :b], [:a, [[:a, [:a, [:a, :b]]], [:a, :b],]]], '', 20)
puts str
#=>
[[:a, :b],
[:a,
[[:a,
[:a, [:a, :b]]],
[:a, :b]]]]
[SEE_ALSO] $>