Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/ghi/json.rb

Overview

Extends any Class to include json_creatable? method.

Instance Method Summary collapse

Instance Method Details

#json_creatable?Boolean

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.

Returns:

  • (Boolean)


1299
1300
1301
# File 'lib/ghi/json.rb', line 1299

def json_creatable?
  respond_to?(:json_create)
end