Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

JSON::Ext::Generator::State.from_state

from_state(opts)

Creates a State object from opts, which ought to be Hash to create a new State instance configured by opts, something else to create an unconfigured instance. If opts is a State object, it is just returned.

See also .new #[] also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0