method

as_json

Importance_0
v1_9_3_125 - Show latest stable - 0 notes - Class: Rational
as_json(*) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File ext/json/lib/json/add/rational.rb, line 11
  def as_json(*)
    {
      JSON.create_id => self.class.name,
      'n'            => numerator,
      'd'            => denominator,
    }
  end
Register or log in to add new notes.