77件ヒット
[1-77件を表示]
(0.050秒)
モジュール
- JSON (44)
- ObjectSpace (33)
キーワード
-
count
_ nodes (11) -
count
_ objects _ size (11) -
count
_ tdata _ objects (11) - generate (11)
-
pretty
_ generate (11) -
pretty
_ unparse (11) - unparse (11)
検索結果
先頭5件
-
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (9422.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
...イト単位で格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効......T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}
@raise TypeError result_hash にハッシュ以外を指定した時に発生します。
戻り値の... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (9422.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
...t_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
@raise TypeError result_hash......ドではありません。パフォー
マンスに興味のある C Ruby の開発者向けのものです。
//emlist[例][ruby]{
ObjectSpace.count_tdata_objects
# => {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
# :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
#... -
ObjectSpace
. # count _ nodes(result _ hash = nil) -> Hash (3322.0) -
ノードの種類ごとの数を格納したハッシュを返します。
...t_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
@raise TypeError result_hash......はありません。パフォー
マンスやメモリ管理に興味のある C Ruby の開発者向けのものです。
//emlist[例][ruby]{
ObjectSpace.count_nodes
# => {:NODE_METHOD=>2027, :NODE_FBODY=>1927, :NODE_CFUNC=>1798, ...}
//}
戻り値のハッシュは処理系に依存します... -
JSON
. # pretty _ generate(object , options = nil) -> String (241.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param options JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定で......。
//emlist[例][ruby]{
require "json"
hash = { "name": "tanaka", "age": 19 }
puts JSON.generate(hash)
# => {"name":"tanaka","age":19}
puts JSON.pretty_generate(hash)
# => {
# "name": "tanaka",
# "age": 19
# }
puts JSON.pretty_generate(hash, space: "\t")
# => {
# "name": "tan... -
JSON
. # pretty _ unparse(object , options = nil) -> String (241.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param options JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定で......。
//emlist[例][ruby]{
require "json"
hash = { "name": "tanaka", "age": 19 }
puts JSON.generate(hash)
# => {"name":"tanaka","age":19}
puts JSON.pretty_generate(hash)
# => {
# "name": "tanaka",
# "age": 19
# }
puts JSON.pretty_generate(hash, space: "\t")
# => {
# "name": "tan... -
JSON
. # generate(object , state = nil) -> String (229.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...こともありません。
unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定で......ter, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指... -
JSON
. # unparse(object , state = nil) -> String (229.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...こともありません。
unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定で......ter, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指...