るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. _builtin each_object
  2. objectspace each_object
  3. object send
  4. object to_enum
  5. object enum_for

クラス

モジュール

キーワード

検索結果

Object#psych_to_yaml(options = {}) -> String (63349.0)

オブジェクトを YAML document に変換します。

...ョンを指定できます。
Psych
.dump と同じなので詳しくはそちらを参照してください。

syck に to_yaml メソッドがあるため、
psych
_to_yaml が別名として定義されています。将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予...
...定であるため、特別の事情がない限り to_yaml を用いてください。

@param options 出力オプション
@see Psych.dump...

Object#to_yaml(options = {}) -> String (63349.0)

オブジェクトを YAML document に変換します。

...ョンを指定できます。
Psych
.dump と同じなので詳しくはそちらを参照してください。

syck に to_yaml メソッドがあるため、
psych
_to_yaml が別名として定義されています。将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予...
...定であるため、特別の事情がない限り to_yaml を用いてください。

@param options 出力オプション
@see Psych.dump...

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

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

...[例][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 (367.0)

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

...[例][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)
//}...