Class: TwitterCldr::Resources::AliasesImporter
- Defined in:
- lib/twitter_cldr/resources/aliases_importer.rb
Constant Summary collapse
- ALIAS_TAGS =
only these aliases will be imported
%w(languageAlias territoryAlias zoneAlias)
Constants inherited from Importer
Instance Attribute Summary
Attributes inherited from Importer
Instance Method Summary collapse
Methods inherited from Importer
#can_import?, default_params, #import, #initialize, locales, output_path, parameter, parameters, #prepare, requirement, requirements, ruby_engine
Constructor Details
This class inherits a constructor from TwitterCldr::Resources::Importer
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/twitter_cldr/resources/aliases_importer.rb', line 20 def execute output_file = File.join(output_path, 'aliases.yml') FileUtils.mkdir_p(output_path) File.open(output_file, 'w:utf-8') do |output| output.write( TwitterCldr::Utils::YAML.dump( TwitterCldr::Utils.deep_symbolize_keys(aliases: aliases), use_natural_symbols: true ) ) end end |