るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.044秒)

別のキーワード

  1. _builtin each
  2. _builtin each_line
  3. prime each
  4. each
  5. tsort tsort_each

クラス

検索結果

IO#each_char -> Enumerator (18116.0)

self に含まれる文字を一文字ずつブロックに渡して評価します。

...ません。

ブロックを省略した場合は各文字について繰り返す Enumerator を返します。

@raise IOError self が読み込み用にオープンされていない場合に発生します。

f = File.new("testfile")
f.each_char {|c| print c, ' ' } #=> #<File:testfile>...

IO#each_char {|c| ... } -> self (18116.0)

self に含まれる文字を一文字ずつブロックに渡して評価します。

...ません。

ブロックを省略した場合は各文字について繰り返す Enumerator を返します。

@raise IOError self が読み込み用にオープンされていない場合に発生します。

f = File.new("testfile")
f.each_char {|c| print c, ' ' } #=> #<File:testfile>...

Module#instance_method(name) -> UnboundMethod (14.0)

self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。

...d(:do_a),
"d" => instance_method(:do_d),
"e" => instance_method(:do_e),
"v" => instance_method(:do_v)
}
def interpret(string)
string.each_char {|b| Dispatcher[b].bind(self).call }
end
end

interpreter = Interpreter.new
interpreter.interpret('dave')
# => Hello there, Dave!
//}...