るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.113秒)
トップページ > クエリ:I[x] > クエリ:Require[x] > クラス:Method[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. _builtin i

ライブラリ

検索結果

Method#source_location -> [String, Integer] | nil (6107.0)

ソースコードのファイル名と行番号を配列で返します。

...合は nil を返します。

@see Proc#source_location

//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----

require
'/tmp/foo'

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]

method
(:puts).s...
...ource_location # => nil
//}...