method
reject
v3.1.0 -
Show latest stable
- Class:
ActiveSupport::OrderedHash
reject(&block)public
No documentation available.
# File activesupport/lib/active_support/ordered_hash.rb, line 123
def reject(&block)
dup.reject!(&block)
end 1Note
reject
This is inverse operation of select. If block return false add item to array.
[1,2,3,4].reject {|n| n%2==0}
[1, 3]
Like select method with inverse.