Method: SDM::Cockroach#to_json

Defined in:
lib/models/porcelain.rb

#to_json(options = {}) ⇒ Object



3321
3322
3323
3324
3325
3326
3327
# File 'lib/models/porcelain.rb', line 3321

def to_json(options={})
	hash = {}
	self.instance_variables.each do |var|
	    hash[var.id2name.delete_prefix('@')] = self.instance_variable_get var
	end
	hash.to_json
end