るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.024秒)
トップページ > ライブラリ:psych[x] > クエリ:IO[x] > バージョン:2.3.0[x] > クエリ:finish[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

検索結果

Psych::Stream#finish -> () (54358.0)

YAML document への変換を完了し、io への出力を完了します。

YAML document への変換を完了し、io への出力を完了します。

Psych::Stream (109.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 と似ています。...