method

parse

rails latest stable - Class: ActiveSupport::Multibyte::Unicode::DatabaseGenerator

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.2.3) is shown here.

parse()
public

No documentation available.

# File activesupport/bin/generate_tables, line 104
        def parse
          SOURCES.each do |type, url|
            filename = File.join(Dir.tmpdir, UNICODE_VERSION, "#{url.split('/').last}")
            unless File.exist?(filename)
              $stderr.puts "Downloading #{url.split('/').last}"
              FileUtils.mkdir_p(File.dirname(filename))
              File.open(filename, "wb") do |target|
                open(url) do |source|
                  source.each_line { |line| target.write line }
                end
              end
            end
            File.open(filename) do |file|
              file.each_line { |line| send "parse_#{type}".intern, line }
            end
          end
          create_composition_map
          normalize_boundary_map
        end