るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.285秒)
トップページ > クエリ:_builtin[x] > クエリ:new[x] > クエリ:each_char[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

検索結果

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!
//}...