るりまサーチ

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

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document to_s
  4. rexml/document clone
  5. rexml/document node_type

ライブラリ

クラス

モジュール

検索結果

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

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

...てメソッドの返り値と
なります。

options で出力に関するオプションを以下の指定できます。

: :version
YAML document に付加するバージョンを [major, minor] という配列、
もしくは文字列で指定します
: :header
出力にヘッダを付...
...ョン

//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 (18157.0)

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

...てメソッドの返り値と
なります。

options で出力に関するオプションを以下の指定できます。

: :version
YAML document に付加するバージョンを [major, minor] という配列、
もしくは文字列で指定します
: :header
出力にヘッダを付...
...ョン

//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::Visitors::YAMLTree.new(options = {}, emitter = Psych::TreeBuilder.new, ss = Psych::ScalarScanner.new) -> Psych::Visitors::YAMLTree (13.0)

YAMLTree オブジェクトを生成します。

...るオプション設定を指定します。
Psych.dump と同じオプションが指定できます。

emitter には AST の構築に使われる Psych::TreeBuilder オブジェクト
を渡します。

ss は Ruby の String が YAML document 上で quote が必要かどうか
を判定する...