Class: TwitterCldr::Resources::CompositionExclusionsImporter
- Inherits:
-
Object
- Object
- TwitterCldr::Resources::CompositionExclusionsImporter
- Defined in:
- lib/twitter_cldr/resources/composition_exclusions_importer.rb
Constant Summary collapse
- COMPOSITION_EXCLUSIONS_URL =
'http://www.unicode.org/Public/6.1.0/ucd/DerivedNormalizationProps.txt'
- COMPOSITION_EXCLUSION_REGEXP =
/^([0-9A-F]+)(?:\.\.([0-9A-F]+))?\s+; Full_Composition_Exclusion #.*$/
- TOTAL_CODE_POINTS_REGEXP =
/^# Total code points: (\d+)$/
Instance Method Summary collapse
- #import ⇒ Object
-
#initialize(input_path, output_path) ⇒ CompositionExclusionsImporter
constructor
Arguments:.
Constructor Details
#initialize(input_path, output_path) ⇒ CompositionExclusionsImporter
Arguments:
input_path - path to DerivedNormalizationProps.txt file
output_path - output directory for generated YAML file
22 23 24 25 |
# File 'lib/twitter_cldr/resources/composition_exclusions_importer.rb', line 22 def initialize(input_path, output_path) @input_path = input_path @output_path = output_path end |
Instance Method Details
#import ⇒ Object
27 28 29 30 31 |
# File 'lib/twitter_cldr/resources/composition_exclusions_importer.rb', line 27 def import File.open(File.join(@output_path, 'composition_exclusions.yml'), 'w') do |output| YAML.dump(generate_composition_exclusions, output) end end |