module Arabic

Constants

CHARACTER_TABLE
VERSION

Public Class Methods

t(string="", to=:arabic)
Alias for: transliterate
transliterate(string="", to=:arabic) click to toggle source
# File lib/arabic.rb, line 67
def transliterate(string="", to=:arabic)
  character_table = Module.const_get(to.to_s.capitalize)::CHARACTER_TABLE
  string.to_s.gsub(/#{Regexp.union(character_table.keys).source}/i, character_table)
end
Also aliased as: t