Parent

Files

Complex

Public Class Methods

json_create(object) click to toggle source
   # File lib/json/add/complex.rb, line 7
7:   def self.json_create(object)
8:     Complex(object['r'], object['i'])
9:   end

Public Instance Methods

as_json(*) click to toggle source
    # File lib/json/add/complex.rb, line 11
11:   def as_json(*)
12:     {
13:       JSON.create_id => self.class.name,
14:       'r'            => real,
15:       'i'            => imag,
16:     }
17:   end
to_json(*) click to toggle source
    # File lib/json/add/complex.rb, line 19
19:   def to_json(*)
20:     as_json.to_json
21:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.