diff options
author | Todd Bealmear <todd@t0dd.io> | 2015-03-01 17:44:36 -0800 |
---|---|---|
committer | Todd Bealmear <todd@t0dd.io> | 2015-03-01 18:45:45 -0800 |
commit | c7a37c10ade8372c712be01a7e4ddbe8785c5139 (patch) | |
tree | 7252f20da29c87cc4d04f0363e530fc8d510a5b1 /guides/source | |
parent | e1e2b54e853a9b405f10bab110c28064164a7469 (diff) | |
download | rails-c7a37c10ade8372c712be01a7e4ddbe8785c5139.tar.gz rails-c7a37c10ade8372c712be01a7e4ddbe8785c5139.tar.bz2 rails-c7a37c10ade8372c712be01a7e4ddbe8785c5139.zip |
Add Enumerable#without
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index 2e7f776319..66626f41d1 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -2182,6 +2182,17 @@ to_visit << node if visited.exclude?(node) NOTE: Defined in `active_support/core_ext/enumerable.rb`. +### `without` + +The method `without` returns a copy of an enumerable with the specified elements +removed: + +```ruby +people.without("Aaron", "Todd") +``` + +NOTE: Defined in `active_support/core_ext/enumerable.rb`. + Extensions to `Array` --------------------- |