Class: BidiMirroring

Inherits:
Object
  • Object
show all
Defined in:
ext/encoding/character/utf-8/data/generate-unicode-data.rb

Instance Method Summary collapse

Instance Method Details

#process(data) ⇒ Object



388
389
390
391
392
393
394
395
# File 'ext/encoding/character/utf-8/data/generate-unicode-data.rb', line 388

def process(data)
  path = File.join(data.dir, 'BidiMirroring.txt')
  File.process(path) do |line|
    fields = line.chomp.sub(/\s*#.*/, '').split(/\s*;\s*/, -1)
    fields.verify_size(2, path, 0)
    data.bidimirror.push([fields[0].to_i(16), fields[1].to_i(16)])
  end
end