るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.012秒)

別のキーワード

  1. stringio read
  2. stringio sysread
  3. stringio readpartial
  4. stringio set_encoding
  5. stringio open

ライブラリ

モジュール

検索結果

Psych.dump(o, io, options = {}) -> () (18169.0)

Ruby のオブジェクト o を YAML ドキュメントに変換します。

...ョン

//emlist[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"

# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>

# Dump an array with indentation set
Psych.dump(['a', ['b']], :indentation =>...
...3) # => "---\n- a\n- - b\n"

# Dump an array to an IO with indentation set
Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}...

Psych.dump(o, options = {}) -> String (18169.0)

Ruby のオブジェクト o を YAML ドキュメントに変換します。

...ョン

//emlist[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"

# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>

# Dump an array with indentation set
Psych.dump(['a', ['b']], :indentation =>...
...3) # => "---\n- a\n- - b\n"

# Dump an array to an IO with indentation set
Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}...