instance method
exclude?
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
exclude?(string)
The inverse of String#include?. Returns true if the string does not include the other string.
"hello".exclude? "lo" #=> false "hello".exclude? "ol" #=> true "hello".exclude? ?h #=> false
Parameters
-
stringreq
Source
# File activesupport/lib/active_support/core_ext/string/exclude.rb, line 8
def exclude?(string)
!include?(string)
end
Defined in activesupport/lib/active_support/core_ext/string/exclude.rb line 8
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String