Exception: Exception
Relationships & Source Files | |
Defined in: | ext/json/lib/json/add/exception.rb |
Class Method Summary
-
.json_create(object)
Deserializes JSON string by constructing new
Exception
object with messagem
and backtraceb
serialized with #to_json
Instance Method Summary
-
#as_json
Returns a hash, that will be turned into a ::JSON object and represent this object.
-
#to_json(*args)
Stores class name (Exception) with message
m
and backtrace arrayb
as ::JSON string.
Class Method Details
.json_create(object)
Deserializes JSON string by constructing new Exception
object with message m
and backtrace b
serialized with #to_json
# File 'ext/json/lib/json/add/exception.rb', line 9
def self.json_create(object) result = new(object['m']) result.set_backtrace object['b'] result end
Instance Method Details
#as_json
Returns a hash, that will be turned into a ::JSON object and represent this object.
#to_json(*args)
Stores class name (Exception) with message m
and backtrace array b
as ::JSON string
# File 'ext/json/lib/json/add/exception.rb', line 27
def to_json(*args) as_json.to_json(*args) end