Method: Faker::Char.fix_umlauts

Defined in:
lib/helpers/char.rb

.fix_umlauts(string) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/helpers/char.rb', line 10

def self.fix_umlauts(string)
  string.gsub(/[äöüß]/i) do |match|
    case match.downcase
      when "ä" 'ae'
      when "ö" 'oe'
      when "ü" 'ue'
      when "ß" 'ss'
    end
  end
end