るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.050秒)
トップページ > クエリ:String#tr[x] > クエリ:defaults_str[x] > クラス:Proc[x]

別のキーワード

  1. matrix tr
  2. string tr_s
  3. string tr_s!
  4. string tr
  5. string tr!

ライブラリ

キーワード

検索結果

Proc#inspect -> String (203.0)

self の文字列表現を返します。

...self の文字列表現を返します。

可能なら self を生成したソースファイル名、行番号を含みます。

//emlist[例][ruby]{
p Proc.new {
tr
ue
}.to_s

# => "#<Proc:0x0x401a880c@-:3>"
//}...

Proc#to_s -> String (203.0)

self の文字列表現を返します。

...self の文字列表現を返します。

可能なら self を生成したソースファイル名、行番号を含みます。

//emlist[例][ruby]{
p Proc.new {
tr
ue
}.to_s

# => "#<Proc:0x0x401a880c@-:3>"
//}...

Proc#source_location -> [String, Integer] | nil (202.0)

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

...mlist[例][ruby]{
# /path/to/target.rb を実行
proc
{}.source_location # => ["/path/to/target.rb", 1]
proc
{}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ["(eval)", 1]
method(:p).to_proc.source_location # => nil
//}

@see Method#sour...