absolute_path -> String
[permalink][rdoc]self が表すフレームの絶対パスを返します。
# 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_ALSO] Thread::Backtrace::Location#path