Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/money.rb
Overview
Overwrites unaccent method of sixarm_ruby_unaccent.
Instance Method Summary collapse
Instance Method Details
#unaccent ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/money.rb', line 11 def unaccent accentmap = ACCENTMAP accentmap.delete("\u{0142}") # Delete ł symbol from ACCENTMAP used in PLN currency accentmap.delete("\u{010D}") # Delete č symbol from ACCENTMAP used in CZK currency accentmap.delete("\u{FDFC}") # Delete ﷼ symbol from ACCENTMAP used in IRR, SAR and YER currencies accentmap.delete("\u{20A8}") # Delete ₨ symbol from ACCENTMAP used in INR, LKR, MUR, NPR, PKR and SCR currencies split(//u).map {|c| accentmap[c] || c }.join("") end |