module Ably::Modules::ModelCommon::ClassMethods
Public Instance Methods
from_json(json_like_object)
click to toggle source
Return a new instance of this object using the provided JSON-like object or JSON string @param json_like_object [Hash, String] JSON-like object or JSON string @return a new instance to this object
# File lib/submodules/ably-ruby/lib/ably/modules/model_common.rb, line 67 def from_json(json_like_object) if json_like_object.kind_of?(String) new(JSON.parse(json_like_object)) else new(json_like_object) end end