reject!

ary.reject! { |item| block } â ary or nil
ary.reject! â Enumerator
Instance Public methods

Equivalent to #delete_if, deleting elements from self for which the block evaluates to true, but returns nil if no changes were made.

The array is changed instantly every time the block is called, not after the iteration is over.

See also Enumerable#reject and #delete_if.

If no block is given, an Enumerator is returned instead.

doc_ruby_on_rails
2015-03-30 19:06:54
Comments
Leave a Comment

Please login to continue.