るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.067秒)

別のキーワード

  1. _builtin arg
  2. etc sc_arg_max
  3. mkmf arg_config
  4. float arg
  5. numeric arg

ライブラリ

キーワード

検索結果

Rational#convert(*arg) -> Rational (328.0)

引数を有理数(Rational)に変換した結果を返します。

...引数を有理数(Rational)に変換した結果を返します。

@param arg 変換対象のオブジェクトです。

Kernel.#Rational の本体です。

@see Kernel.#Rational...

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

自身を 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...