Browse files

AS guide: documents Enumerable#exclude?

  • Loading branch information...
1 parent 25550d9 commit 64eee76541e56d1230f2fdcab318ea81bf786e80 @fxn fxn committed Dec 16, 2009
Showing with 8 additions and 0 deletions.
  1. +8 −0 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

0 comments on commit 64eee76

Please sign in to comment.