Object
# File lib/json/add/rational.rb, line 7 def self.json_create(object) Rational(object['n'], object['d']) end
# File lib/json/add/rational.rb, line 11 def as_json(*) { JSON.create_id => self.class.name, 'n' => numerator, 'd' => denominator, } end
# File lib/json/add/rational.rb, line 19 def to_json(*) as_json.to_json end
[Validate]
Generated with the Darkfish Rdoc Generator 2.