diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/exclude.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/exclude.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/exclude.rb b/activesupport/lib/active_support/core_ext/string/exclude.rb new file mode 100644 index 0000000000..5ca268b953 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/string/exclude.rb @@ -0,0 +1,6 @@ +class String + # The inverse of String#include?. Returns true if the string does not include the other string. + def exclude?(string) + !include?(string) + end +end |