Class: UnserializableObject

Inherits:
Object show all
Defined in:
lib/wires/cluster/json.rb

Overview

A placeholder object to alert the JSON receiver that the intended object has no defined serialization scheme

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.json_create(data) ⇒ Object



32
33
34
# File 'lib/wires/cluster/json.rb', line 32

def self.json_create(data)
  self.new
end

Instance Method Details

#as_json(opt = nil) ⇒ Object



28
29
30
# File 'lib/wires/cluster/json.rb', line 28

def as_json(opt=nil)
  { json_class:self.class.name }
end

#inspectObject



26
# File 'lib/wires/cluster/json.rb', line 26

def inspect; to_s; end

#to_sObject



25
# File 'lib/wires/cluster/json.rb', line 25

def to_s; '<UnserializableObject>'; end