33件ヒット
[1-33件を表示]
(0.285秒)
検索結果
先頭3件
-
IO
# each _ char -> Enumerator (26114.0) -
self に含まれる文字を一文字ずつブロックに渡して評価します。
...ません。
ブロックを省略した場合は各文字について繰り返す Enumerator を返します。
@raise IOError self が読み込み用にオープンされていない場合に発生します。
f = File.new("testfile")
f.each_char {|c| print c, ' ' } #=> #<File:testfile>... -
IO
# each _ char {|c| . . . } -> self (26114.0) -
self に含まれる文字を一文字ずつブロックに渡して評価します。
...ません。
ブロックを省略した場合は各文字について繰り返す Enumerator を返します。
@raise IOError self が読み込み用にオープンされていない場合に発生します。
f = File.new("testfile")
f.each_char {|c| print c, ' ' } #=> #<File:testfile>... -
Module
# instance _ method(name) -> UnboundMethod (8012.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!
//}...