るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.068秒)
トップページ > クエリ:t[x] > ライブラリ:json/add/rational[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

クラス

キーワード

検索結果

Rational#to_json(*args) -> String (6102.0)

自身を JSON 形式の文字列に変換して返します。

...JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 使用しません。

//emlist[例][ruby]{
require 'json/add/rational'
Rational(1, 3).to_json # => "{\"json_class\":\"Rational\",\"n\":1,\"d\":3}"
//}

@see JSON::Generator::GeneratorMethods::Hash#to_json...
...::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json
に渡されます。

//emlist[例][ruby]{
require 'json/add/rational'
Rational(1, 3).to_json # => "{\"json_class\":\"Rational\",...
...\"n\":1,\"d\":3}"
//}

@see JSON::Generator::GeneratorMethods::Hash#to_json...

Rational.json_create(hash) -> Rational (6102.0)

JSON のオブジェクトから Rational のオブジェクトを生成して返します。

...JSON のオブジェクトから Rational のオブジェクトを生成して返します。

@param hash 分子をキー 'n'、分母をキー 'd' に持つハッシュを指定します。...