Skip to content

Commit

Permalink
AS guide: documents Enumerable#exclude?
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Dec 16, 2009
1 parent 25550d9 commit 64eee76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions railties/guides/source/active_support_core_extensions.textile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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]} @see_more = videos.many? {|video| video.category == params[:category]}
</ruby> </ruby>


h4. +exclude?+

The predicate +exclude?+ tests whether a given object does *not* belong to the collection. It is the negation of the builtin +include?+:

<ruby>
to_visit << node if visited.exclude?(node)
</ruby>

h3. Extensions to +Array+ h3. Extensions to +Array+


h4. Accessing h4. Accessing
Expand Down

0 comments on commit 64eee76

Please sign in to comment.