Method: String#fix_apostrophe_modifiers!
- Defined in:
- lib/name_tamer/string.rb
#fix_apostrophe_modifiers! ⇒ Object
125 126 127 128 129 130 131 |
# File 'lib/name_tamer/string.rb', line 125 def fix_apostrophe_modifiers! %w(Dell D).each do |modifier| gsub!(/(.#{modifier}')(\w)/) { |_| "#{Regexp.last_match[1].rstrip.downcase}#{Regexp.last_match[2]}" } end self # Allows chaining end |