るりまサーチ

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

別のキーワード

  1. cgi escape_element
  2. cgi escape_html
  3. cgi escape
  4. shellwords escape
  5. cgi table_for_escape_html__

クラス

検索結果

Rational#to_json(*args) -> String (203.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...
...@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...