Exception: Exception

Defined in:
lib/json/add/core.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.json_create(object) ⇒ Object



121
122
123
124
125
# File 'lib/json/add/core.rb', line 121

def self.json_create(object)
  result = new(object['m'])
  result.set_backtrace object['b']
  result
end

Instance Method Details

#to_json(*args) ⇒ Object



127
128
129
130
131
132
133
# File 'lib/json/add/core.rb', line 127

def to_json(*args)
  {
    JSON.create_id => self.class.name,
    'm'   => message,
    'b' => backtrace,
  }.to_json(*args)
end