Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > jsonライブラリ > JSON::Stateクラス > from_state

singleton method JSON::State.from_state

from_state(options) -> JSON::State

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

[PARAM] options:
JSON::State のインスタンスか、ハッシュを指定します。
[RETURN]
options がハッシュである場合は、それによって初期化した JSON::State を 返します。options が JSON::State のインスタンスである場合は単に options を返します。いずれでも無い場合は、何も設定されていない JSON::State の インスタンスを返します。
class JSON::State