123456789_123456789_123456789_123456789_123456789_

Class: Class

Relationships & Source Files
Inherits: Object
Defined in: ext/json/lib/json/common.rb

Overview

Extends any Class to include json_creatable? method.

Instance Attribute Summary

Instance Attribute Details

#json_creatable?Boolean (readonly)

Returns true if this class can be used to create an instance from a serialised ::JSON string. The class has to implement a class method json_create that expects a hash as first parameter. The hash should include the required data.

[ GitHub ]

  
# File 'ext/json/lib/json/common.rb', line 700

def json_creatable?
  respond_to?(:json_create)
end