214件ヒット
[201-214件を表示]
(0.075秒)
クラス
-
ARGF
. class (38) -
Enumerator
:: Lazy (24) - IO (38)
- Module (12)
- String (64)
- StringIO (38)
キーワード
- chars (66)
-
collect
_ concat (12) -
each
_ grapheme _ cluster (16) -
flat
_ map (12) -
instance
_ method (12)
検索結果
先頭2件
-
Enumerator
:: Lazy # flat _ map {|item| . . . } -> Enumerator :: Lazy (7.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
...てイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されま... -
Module
# instance _ method(name) -> UnboundMethod (7.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!
//}...