관리-도구
편집 파일: collect%21-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Invokes the block once for each element of <em>self</em>, replacing the element with the value returned by <em>block</em>. See also <tt>Enumerable#collect</tt>. - !ruby/struct:SM::Flow::VERB body: " a = [ "a", "b", "c", "d" ]\n a.collect! {|x| x + "!" }\n a #=> [ "a!", "b!", "c!", "d!" ]\n" full_name: Array#collect! is_singleton: false name: collect! params: | array.collect! {|item| block } -> array array.map! {|item| block } -> array visibility: public