るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.043秒)
トップページ > ライブラリ:ビルトイン[x] > バージョン:2.1.0[x] > クエリ:String[x] > クラス:Proc[x]

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

キーワード

検索結果

Proc#inspect -> String (316.0)

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

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

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

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

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

Proc#to_s -> String (316.0)

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

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

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

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

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

Proc#source_location -> [String, Integer] | nil (313.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...