2件ヒット
[1-2件を表示]
(0.016秒)
別のキーワード
種類
- クラス (1)
- インスタンスメソッド (1)
クラス
-
Psych
:: Stream (1)
検索結果
-
Psych
:: Stream # finish -> () (54406.0) -
YAML document への変換を完了し、io への出力を完了します。
YAML document への変換を完了し、io への出力を完了します。 -
Psych
:: Stream (175.0) -
入力されたオブジェクトから変換された YAML document を指定した IO に出力する機能を持つクラスです。
...を完了します。
stream = Psych::Stream.new($stdout)
stream.start
stream.push({:foo => 'bar'})
stream.finish
YAML document は(バッファリングされずに)直接 $stdout に出力されます。
finish を確実に呼び出すためには Psych::Stream#start メソッドを
ブ......ロック付きで呼び出すとよいでしょう。
stream = Psych::Stream.new($stdout)
stream.start do |em|
em.push(:foo => 'bar')
end
基本的な仕組みは Psych::Visitors::YAMLTree と似ています。...