3件ヒット
[1-3件を表示]
(0.038秒)
クラス
- PP (3)
キーワード
- pp (1)
-
sharing
_ detection (1) -
sharing
_ detection= (1)
検索結果
先頭3件
-
PP
. sharing _ detection -> bool (18328.0) -
共有検出フラグを表すアクセサです。 デフォルトは false です。true である場合、 PP.pp は一度出力したオブジェクトを再び出力する時 Object#pretty_print_cycle を使います。
...true である場合、
PP.pp は一度出力したオブジェクトを再び出力する時
Object#pretty_print_cycle を使います。
@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], [...]]
//}... -
PP
. sharing _ detection=(boolean) (18328.0) -
共有検出フラグを表すアクセサです。 デフォルトは false です。true である場合、 PP.pp は一度出力したオブジェクトを再び出力する時 Object#pretty_print_cycle を使います。
...true である場合、
PP.pp は一度出力したオブジェクトを再び出力する時
Object#pretty_print_cycle を使います。
@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], [...]]
//}... -
PP
. pp(obj , out = $ > , width = 79) -> object (382.0) -
指定されたオブジェクト obj を出力先 out に幅 width で出力します。 出力先 out を返します。
...< メソッドが定義されている必要があります。
@param width 出力先の幅を指定します。
//emlist[][ruby]{
require 'pp'
str = PP.pp(b], [:a, [[:a, [:a, [:a, :b], [:a, :b],]]], '', 20)
puts str
# =>
# [[:a, :b],
# [:a,
# [[:a,
# [:a, [:a, :b]]],
# [:a, :b]]]]
//}...