るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

検索結果

Set#collect! {|o| ...} -> self (54613.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 (9313.0)

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

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

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

@see Enumerable#collect...