るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. matrix map
  2. _builtin map
  3. matrix map!
  4. _builtin flat_map
  5. set map!

クラス

キーワード

検索結果

Set#map! {|o| ...} -> self (9328.0)

集合の各要素についてブロックを評価し、その結果で元の集合を置き換えます。

...集合の各要素についてブロックを評価し、その結果で元の集合を置き換えます。

//emlist[][ruby]{
require 'set'
set
= Set['hello', 'world']
set
.map! {|str| str.capitalize}
p set # => #<Set: {"Hello", "World"}>
//}

@see Enumerable#collect...

Set#collect! {|o| ...} -> self (28.0)

集合の各要素についてブロックを評価し、その結果で元の集合を置き換えます。

...集合の各要素についてブロックを評価し、その結果で元の集合を置き換えます。

//emlist[][ruby]{
require 'set'
set
= Set['hello', 'world']
set
.map! {|str| str.capitalize}
p set # => #<Set: {"Hello", "World"}>
//}

@see Enumerable#collect...