るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

検索結果

Set#map! {|o| ...} -> self (15208.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 (108.0)

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

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

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

@see Enumerable#collect...