instance method
_dasherize
Ruby on Rails 5.2.8.1
Since v3.0.20 PrivateSignature
_dasherize(key)
No documentation comment.
Parameters
-
keyreq
Source
# File activesupport/lib/active_support/xml_mini.rb, line 166
def _dasherize(key)
# $2 must be a non-greedy regex for this to work
left, middle, right = /\A(_*)(.*?)(_*)\Z/.match(key.strip)[1, 3]
"#{left}#{middle.tr('_ ', '--')}#{right}"
end
Defined in activesupport/lib/active_support/xml_mini.rb line 166
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::XmlMini