るりまサーチ

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

別のキーワード

  1. psych new
  2. psych any
  3. psych anchor
  4. psych tag
  5. psych load_stream

ライブラリ

モジュール

検索結果

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

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

...う配列、
もしくは文字列で指定します
: :header
出力にヘッダを付けるかどうかを真偽値で指定します
: :indentation
インデントのレベルを 1 から 9 までの整数で指定します
: :canonical
出力の style が canonical であるかどうか...
...ump 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 (17055.0)

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

...う配列、
もしくは文字列で指定します
: :header
出力にヘッダを付けるかどうかを真偽値で指定します
: :indentation
インデントのレベルを 1 から 9 までの整数で指定します
: :canonical
出力の style が canonical であるかどうか...
...ump 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)
//}...