72件ヒット
[1-72件を表示]
(0.058秒)
キーワード
- caller (36)
-
fast
_ unparse (12) -
pretty
_ unparse (12) - unparse (12)
検索結果
先頭5件
-
JSON
. # unparse(object , state = nil) -> String (3353.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...また、循環参照のチェックを行います。JSON::NaN, JSON::Infinity,
JSON::MinusInfinity を生成することもありません。
unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state......文字列です。
: :space
a string that is put after, 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 J... -
JSON
. # fast _ unparse(object) -> String (3305.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...ることがあります。
このため容易に無限ループを発生させることができるので、気をつけてください。
fast_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
//emlist[例... -
JSON
. # pretty _ unparse(object , options = nil) -> String (3305.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...字列に変換して返します。
このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param options... -
Kernel
. # caller(range) -> [String] | nil (231.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end
def foo
p parse_caller(caller.first)
end
def bar
foo
p parse_caller(caller.first)
end
bar
p parse_caller(caller.first)
#=... -
Kernel
. # caller(start = 1) -> [String] | nil (231.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end
def foo
p parse_caller(caller.first)
end
def bar
foo
p parse_caller(caller.first)
end
bar
p parse_caller(caller.first)
#=... -
Kernel
. # caller(start , length) -> [String] | nil (231.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end
def foo
p parse_caller(caller.first)
end
def bar
foo
p parse_caller(caller.first)
end
bar
p parse_caller(caller.first)
#=...