るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.221秒)
トップページ > クエリ:sharing_detection=[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

キーワード

検索結果

PP.sharing_detection=(boolean) (15106.0)

共有検出フラグを表すアクセサです。 デフォルトは false です。true である場合、 PP.pp は一度出力したオブジェクトを再び出力する時 Object#pretty_print_cycle を使います。

...le を使います。

@param boolean 共有検出フラグを true か false で指定します。

//emlist[][ruby]{
require 'pp'

b = [1, 2, 3]
a = [b, b]

pp a #=> [[1, 2, 3], [1, 2, 3]]

PP.sharing_detection = true
pp a #=> [[1, 2, 3], [...]]
//}...
...etty_print_cycle を使います。

@param boolean 共有検出フラグを true か false で指定します。

//emlist[][ruby]{
b = [1, 2, 3]
a = [b, b]

pp a #=> [[1, 2, 3], [1, 2, 3]]

PP.sharing_detection = true
pp a #=> [[1, 2, 3], [...]]
//}...

pp (12.0)

オブジェクトなどを見やすく出力するためのライブラリです。

...">], @singleline_w
idth=1>, #<PrettyPrint::Text:0x81a0af4 @tail=0, @width=1, @text="]">], @singleli
ne_width=6>], @singleline_width=6>, @sharing_detection=false>

pp による pretty-print された出力:
#<PP:0x40d0688
@buf=
#<PrettyPrint::Group:0x40d064c
@buf=
[#<PrettyPri...
...@tail=0>],
@group=0,
@singleline_width=6,
@tail=0>,
@genspace=#<Proc:0x40d0656>,
@nest=[0],
@newline="\n",
@sharing_detection=false,
@stack=[]>


=== 出力のカスタマイズ

あるクラスの pp の出力をカスタマイズしたい場合は、
そのク...

PP.sharing_detection -> bool (6.0)

共有検出フラグを表すアクセサです。 デフォルトは false です。true である場合、 PP.pp は一度出力したオブジェクトを再び出力する時 Object#pretty_print_cycle を使います。

...le を使います。

@param boolean 共有検出フラグを true か false で指定します。

//emlist[][ruby]{
require 'pp'

b = [1, 2, 3]
a = [b, b]

pp a #=> [[1, 2, 3], [1, 2, 3]]

PP.sharing_detection = true
pp a #=> [[1, 2, 3], [...]]
//}...
...etty_print_cycle を使います。

@param boolean 共有検出フラグを true か false で指定します。

//emlist[][ruby]{
b = [1, 2, 3]
a = [b, b]

pp a #=> [[1, 2, 3], [1, 2, 3]]

PP.sharing_detection = true
pp a #=> [[1, 2, 3], [...]]
//}...