Object
Struct serialization/deserialization
Returns a hash, that will be turned into a JSON object and represent this object.
# File lib/json/add/struct.rb, line 16 16: def as_json(*) 17: klass = self.class.name 18: klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!" 19: { 20: JSON.create_id => klass, 21: 'v' => values, 22: } 23: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.