るりまサーチ

最速Rubyリファレンスマニュアル検索!
108件ヒット [101-108件を表示] (0.066秒)
トップページ > クエリ:l[x] > クエリ:attr_accessor[x]

別のキーワード

  1. module attr
  2. net/imap attr
  3. _builtin attr
  4. rdoc attr_modifiers
  5. etc sc_thread_attr_stacksize

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

Thread::Backtrace::Location#to_s -> String (3006.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.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}...
<< < 1 2 >>