るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.124秒)
トップページ > クエリ:r[x] > 種類:特異メソッド[x] > クラス:JSON::State[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

検索結果

JSON::State.from_state(options) -> JSON::State (6102.0)

与えられた options によって生成した JSON::State のインスタンスを返します。

... JSON::State のインスタンスを返します。

@param options JSON::State のインスタンスか、ハッシュを指定します。

@return options がハッシュである場合は、それによって初期化した JSON::State
返します。options が JSON::State...
... JSON::State
インスタンスを返します。

//emlist[例 Hash を指定][ruby]{
r
equire "json"

json_state = JSON::State.from_state(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}

//emlist[例 JSON::State を指定][ruby]{
r
equire...
..."json"

json_state = JSON::State.from_state(indent: "\t")
# JSON を出力する何らかの処理を実行する
copy = JSON::State.from_state(json_state)
copy.class # => JSON::Ext::Generator::State
copy.indent # => "\t"
//}...