Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AS guide: documents Enumerable#exclude?

  • Loading branch information...
commit 64eee76541e56d1230f2fdcab318ea81bf786e80 1 parent 25550d9
Xavier Noria fxn authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 railties/guides/source/active_support_core_extensions.textile
8 railties/guides/source/active_support_core_extensions.textile
@@ -864,6 +864,14 @@ If an optional block is given +many?+ only takes into account those elements tha
@see_more = videos.many? {|video| video.category == params[:category]}
+h4. +exclude?+
+The predicate +exclude?+ tests whether a given object does *not* belong to the collection. It is the negation of the builtin +include?+:
+to_visit << node if visited.exclude?(node)
h3. Extensions to +Array+
h4. Accessing
Please sign in to comment.
Something went wrong with that request. Please try again.