33件ヒット
[1-33件を表示]
(0.016秒)
種類
- モジュール関数 (22)
- インスタンスメソッド (11)
キーワード
-
caller
_ locations (22) -
install
_ files (11)
検索結果
先頭3件
-
Kernel
# install _ files(mfile , ifiles , map = nil , srcprefix = nil) -> [] (108.0) -
このメソッドは create_makefile, install_rb が使用します。 内部用のメソッドです。
...ll_rb が使用します。
内部用のメソッドです。
@param mfile Makefile を表す File のインスタンスです。
@param ifiles インストールするファイルのリストを指定します。
@param map ???
@param srcprefix ソースディレクトリを指定します。... -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (13.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...します。
//emlist[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_location......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (13.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...します。
//emlist[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_location......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller...