120件ヒット
[101-120件を表示]
(0.091秒)
クラス
- Exception (24)
-
OptionParser
:: ParseError (12) - Thread (12)
-
Thread
:: Backtrace :: Location (72)
キーワード
-
absolute
_ path (12) -
base
_ label (12) - inspect (12)
- label (12)
- path (12)
-
set
_ backtrace (24) -
to
_ s (12)
検索結果
-
Thread
:: Backtrace :: Location # absolute _ path -> String (3108.0) -
self が表すフレームの絶対パスを返します。
...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
Thread
:: Backtrace :: Location # to _ s -> String (3102.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo...