るりまサーチ

最速Rubyリファレンスマニュアル検索!
72件ヒット [1-72件を表示] (0.058秒)
トップページ > クエリ:string[x] > クエリ:String[x] > クエリ:parse[x] > 種類:モジュール関数[x]

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

ライブラリ

モジュール

キーワード

検索結果

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)

#=...