class Object
Constants
- CommentBlockRx
- CommentLineRx
Public Instance Methods
targetify(t)
click to toggle source
# File lib/extensions/autoxrefs.rb, line 18 def targetify(t) t.downcase.gsub(/(\s|-)/, '_') end
titleify(t)
click to toggle source
# File lib/extensions/autoxrefs.rb, line 28 def titleify(t) t = t.gsub(/\_/, ' ') t = t.lstrip t = t.split.map(&:capitalize).join(' ') end
trim(s)
click to toggle source
# File lib/extensions/autoxrefs.rb, line 13 def trim(s) s = s.gsub(/^_docs\//, '') s = s.gsub(/(\.adoc|\.md|\.html)/, '') end
underscorify(t)
click to toggle source
# File lib/extensions/autoxrefs.rb, line 22 def underscorify(t) t = t.downcase.gsub(/(\s|-)/, '_') t = t.prepend('_') unless t.match(/^_/) t = t.gsub(/___/, '_').delete('`') end