Parent

Files

JSON::GenericObject

Public Class Methods

json_create(data) click to toggle source
    # File lib/json/generic_object.rb, line 8
 8:       def json_create(data)
 9:         data = data.dup
10:         data.delete JSON.create_id
11:         self[data]
12:       end

Public Instance Methods

[](name) click to toggle source
    # File lib/json/generic_object.rb, line 19
19:     def [](name)
20:       table[name.to_sym]
21:     end
[]=(name, value) click to toggle source
    # File lib/json/generic_object.rb, line 23
23:     def []=(name, value)
24:       __send__ "#{name}=", value
25:     end
as_json(*) click to toggle source
    # File lib/json/generic_object.rb, line 31
31:     def as_json(*)
32:       { JSON.create_id => self.class.name }.merge to_hash
33:     end
to_hash() click to toggle source
    # File lib/json/generic_object.rb, line 15
15:     def to_hash
16:       table
17:     end
to_json(*a) click to toggle source
    # File lib/json/generic_object.rb, line 35
35:     def to_json(*a)
36:       as_json.to_json(*a)
37:     end
|(other) click to toggle source
    # File lib/json/generic_object.rb, line 27
27:     def |(other)
28:       self.class[other.to_hash.merge(to_hash)]
29:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.