# File lib/core/facets/string/titlecase.rb, line 11 def titlecase tr('_', ' '). gsub(/\s+/, ' '). gsub(/\b\w/){ $`[-1,1] == "'" ? $& : $&.upcase } end