るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.030秒)
トップページ > クエリ:new[x] > クエリ:line[x] > モジュール:Psych[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

検索結果

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

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

...を真偽値で指定します
: :line_width
「好ましい」行幅を整数値で指定します

@param o 変換するオブジェクト
@param io 出力先
@param options 出力オプション

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

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

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

...を真偽値で指定します
: :line_width
「好ましい」行幅を整数値で指定します

@param o 変換するオブジェクト
@param io 出力先
@param options 出力オプション

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