From 64eee76541e56d1230f2fdcab318ea81bf786e80 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 16 Dec 2009 23:47:49 +0100 Subject: AS guide: documents Enumerable#exclude? --- railties/guides/source/active_support_core_extensions.textile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/guides/source/active_support_core_extensions.textile') diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 81b6894f74..4b8e2ef691 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/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 -- cgit v1.2.3