Method: Humanize::Id#correct_one_thousand

Defined in:
lib/humanize/locales/id.rb

#correct_one_thousand(parts) ⇒ Object



29
30
31
32
33
34
# File 'lib/humanize/locales/id.rb', line 29

def correct_one_thousand(parts)
  lots = LOTS.drop(2)
  wrong_1000_re = /(?<=#{lots.join(' |')} )\s*satu ribu|^satu ribu/
  parts = parts.reverse.join(" ").sub(wrong_1000_re, 'seribu')
  parts.split.reverse
end