るりまサーチ

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

別のキーワード

  1. enumerable min
  2. enumerable min_by
  3. enumerable max_by
  4. enumerable max
  5. enumerable count

ライブラリ

クラス

検索結果

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

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

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

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

@see Enumerable#collect...

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

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

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

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

@see Enumerable#collect...