instance method
to_regex
Ruby on Rails 6.0.6
Since v5.2.8.1 Last seen in v8.0.4 PrivateSignature
to_regex(string)
No documentation comment.
Parameters
-
stringreq
Source
# File activesupport/lib/active_support/inflector/inflections.rb, line 59
def to_regex(string)
/\b#{::Regexp.escape(string)}\Z/i
end
Defined in activesupport/lib/active_support/inflector/inflections.rb line 59
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector::Inflections::Uncountables