るりまサーチ

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

別のキーワード

  1. time parse
  2. csv parse
  3. ripper parse
  4. parser parse
  5. psych parse_stream

ライブラリ

モジュール

キーワード

検索結果

<< < 1 2 >>

Kernel.#caller(start = 1) -> [String] | nil (25.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 (25.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)

#=...

JSON.#load_file!(filespec, opts = {}) -> object (13.0)

filespec で指定した JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。

...JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。

@param filespec ファイル名を指定します。

@param options オプションをハッシュで指定します。指定可能なオプションは JSON.#parse! と同様です。

@see JSON.#parse!...

JSON.#load_file(filespec, opts = {}) -> object (13.0)

filespec で指定した JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。

...JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。

@param filespec ファイル名を指定します。

@param options オプションをハッシュで指定します。指定可能なオプションは JSON.#parse と同様です。

@see JSON.#parse...

Kernel.#URI(uri_str) -> object (7.0)

与えられた URI から該当する URI::Generic のサブクラスのインスタンスを生成して 返します。scheme が指定されていない場合は、URI::Generic オブジェクトを返します。

...生成して
返します。scheme が指定されていない場合は、URI::Generic オブジェクトを返します。

@param uri_str パースしたい URI を文字列として与えます。

@raise URI::InvalidURIError パースに失敗した場合に発生します。

@see URI.parse...

絞り込み条件を変える

<< < 1 2 >>