module TwitterCldr::Resources

Constants

ReadmeAssertionFailure

Public Class Methods

importer_classes() click to toggle source
# File lib/twitter_cldr/resources.rb, line 110
def importer_classes
  @importer_classes ||=
    standard_importer_classes +
    property_importer_classes
end
importer_classes_for_ruby_engine() click to toggle source
# File lib/twitter_cldr/resources.rb, line 116
def importer_classes_for_ruby_engine
  engine = case RUBY_ENGINE
    when 'ruby' then :mri
    when 'jruby' then :jruby
    else
      raise "Unsupported RUBY_ENGINE '#{RUBY_ENGINE}'"
  end

  importer_classes.select do |klass|
    klass.default_params[:ruby_engine] == engine
  end
end
locale_based_importer_classes_for_ruby_engine() click to toggle source
# File lib/twitter_cldr/resources.rb, line 129
def locale_based_importer_classes_for_ruby_engine
  importer_classes_for_ruby_engine.select do |klass|
    !!klass.default_params[:locales]
  end
end
property_importer_classes() click to toggle source
# File lib/twitter_cldr/resources.rb, line 86
def property_importer_classes
  @property_importer_classes ||= [
    Properties::AgePropertyImporter,
    Properties::ArabicShapingPropertyImporter,
    Properties::BidiBracketsPropertyImporter,
    Properties::BlocksPropertyImporter,
    Properties::DerivedCorePropertiesImporter,
    Properties::EastAsianWidthPropertyImporter,
    Properties::EmojiImporter,
    Properties::GraphemeBreakPropertyImporter,
    Properties::HangulSyllableTypePropertyImporter,
    Properties::IndicPositionalCategoryPropertyImporter,
    Properties::IndicSyllabicCategoryPropertyImporter,
    Properties::JamoPropertyImporter,
    Properties::LineBreakPropertyImporter,
    Properties::PropListImporter,
    Properties::ScriptExtensionsPropertyImporter,
    Properties::ScriptPropertyImporter,
    Properties::SentenceBreakPropertyImporter,
    Properties::UnicodeDataPropertiesImporter,
    Properties::WordBreakPropertyImporter
  ]
end
standard_importer_classes() click to toggle source

these importer class methods aren't constants in order to avoid loading all the classes when the library is required

# File lib/twitter_cldr/resources.rb, line 51
def standard_importer_classes
  @standard_importer_classes ||= [
    AliasesImporter,
    Bcp47TimezoneMetadataImporter,
    BidiTestImporter,
    CasefolderClassGenerator,
    CollationTestsImporter,
    CollationTriesImporter,
    CurrencySymbolsImporter,
    DayPeriodRulesImporter,
    HyphenationImporter,
    LanguageCodesImporter,
    ListFormatsImporter,
    LocalesResourcesImporter,
    NumberFormatsImporter,
    ParentLocalesImporter,
    PostalCodesImporter,
    RbnfTestImporter,
    SegmentDictionariesImporter,
    SegmentRulesImporter,
    SegmentTestsImporter,
    TailoringImporter,
    TerritoriesImporter,
    TimezonesImporter,
    TimezoneRegionsImporter,
    TimezoneTestsImporter,
    TransformTestsImporter,
    TransformsImporter,
    UnicodeDataImporter,
    UnicodePropertyAliasesImporter,
    UnitsImporter,
    ValidityDataImporter,
  ]
end