# File lib/transliteration/simple.rb, line 67 def self.dirify(string) st = self.translify(string) st.gsub!(/(\s\&\s)|(\s\&\;\s)/, ' and ') # convert & to "and" st.gsub!(/\W/, ' ') #replace non-chars st.gsub!(/(_)$/, '') #trailing underscores st.gsub!(/^(_)/, '') #leading unders st.strip.translify.gsub(/(\s)/,'-').downcase.squeeze('-') end