Browse files

Changed Object#either? to Object#among? on guides

  • Loading branch information...
1 parent 3366479 commit dbf32eb6ca1c0666c6826992af1d986d0e81b2c3 @smartinez87 smartinez87 committed Apr 12, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 railties/guides/source/active_support_core_extensions.textile
View
12 railties/guides/source/active_support_core_extensions.textile
@@ -442,9 +442,9 @@ require_library_or_gem('mysql')
NOTE: Defined in +active_support/core_ext/kernel/requires.rb+.
-h4. +in?+ and +either?+
+h4. +in?+ and +among?+
-The predicate +in?+ tests if an object is included in another object, and the predicate +either?+ tests if an object is included in a list of objects which will be passed as arguments.
+The predicate +in?+ tests if an object is included in another object, and the predicate +among?+ tests if an object is included in a list of objects which will be passed as arguments.
Examples of +in?+:
@@ -454,12 +454,12 @@ Examples of +in?+:
25.in?(30..50) # => false
</ruby>
-Examples of +either?+:
+Examples of +among?+:
<ruby>
- 1.either?(1,2,3) # => true
- 5.either?(1,2,3) # => false
- [1,2,3].either?([1,2,3], 2, [3,4,5]) # => true
+ 1.among?(1,2,3) # => true
+ 5.among?(1,2,3) # => false
+ [1,2,3].among?([1,2,3], 2, [3,4,5]) # => true
</ruby>
NOTE: Defined in +active_support/core_ext/object/inclusion.rb+.

0 comments on commit dbf32eb

Please sign in to comment.