Sha256: 718856f68f5a99108b657e02c49f5b4f60be331c2c0cc33a6bf5daf04cc715dc

Contents?: true

Size: 787 Bytes

Versions: 5

Compression:

Stored size: 787 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Resources
    module Properties

      class PropListImporter < PropertyImporter
        DATA_URL = 'ucd/PropList.txt'

        def initialize(input_path, database)
          super(
            input_path: input_path,
            property_name: nil,
            data_url: DATA_URL,
            data_path: File.basename(DATA_URL),
            database: database
          )
        end

        private

        def load
          super do |data, ret|
            code_points = expand_range(data[0])
            property_name = format_property_value(data[1])
            ret[property_name][nil] += code_points
          end
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
twitter_cldr-4.0.0 lib/twitter_cldr/resources/properties/prop_list_importer.rb
twitter_cldr-3.6.0 lib/twitter_cldr/resources/properties/prop_list_importer.rb
twitter_cldr-3.5.0 lib/twitter_cldr/resources/properties/prop_list_importer.rb
twitter_cldr-3.4.0 lib/twitter_cldr/resources/properties/prop_list_importer.rb
twitter_cldr-3.3.0 lib/twitter_cldr/resources/properties/prop_list_importer.rb