Module: TwitterCldr::Resources
- Defined in:
- lib/twitter_cldr/resources.rb,
lib/twitter_cldr/resources/uli.rb,
lib/twitter_cldr/resources/loader.rb,
lib/twitter_cldr/resources/importer.rb,
lib/twitter_cldr/resources/properties.rb,
lib/twitter_cldr/resources/requirements.rb,
lib/twitter_cldr/resources/import_resolver.rb,
lib/twitter_cldr/resources/readme_renderer.rb,
lib/twitter_cldr/resources/aliases_importer.rb,
lib/twitter_cldr/resources/bidi_test_importer.rb,
lib/twitter_cldr/resources/rbnf_test_importer.rb,
lib/twitter_cldr/resources/tailoring_importer.rb,
lib/twitter_cldr/resources/transforms_importer.rb,
lib/twitter_cldr/resources/unicode_file_parser.rb,
lib/twitter_cldr/resources/hyphenation_importer.rb,
lib/twitter_cldr/resources/regexp_ast_generator.rb,
lib/twitter_cldr/resources/postal_codes_importer.rb,
lib/twitter_cldr/resources/unicode_data_importer.rb,
lib/twitter_cldr/resources/segment_tests_importer.rb,
lib/twitter_cldr/resources/validity_data_importer.rb,
lib/twitter_cldr/resources/language_codes_importer.rb,
lib/twitter_cldr/resources/number_formats_importer.rb,
lib/twitter_cldr/resources/transform_test_importer.rb,
lib/twitter_cldr/resources/collation_tests_importer.rb,
lib/twitter_cldr/resources/collation_tries_importer.rb,
lib/twitter_cldr/resources/requirements/pom_manager.rb,
lib/twitter_cldr/resources/currency_symbols_importer.rb,
lib/twitter_cldr/resources/properties/emoji_importer.rb,
lib/twitter_cldr/resources/casefolder_class_generator.rb,
lib/twitter_cldr/resources/locales_resources_importer.rb,
lib/twitter_cldr/resources/properties/property_importer.rb,
lib/twitter_cldr/resources/requirements/git_requirement.rb,
lib/twitter_cldr/resources/requirements/icu_requirement.rb,
lib/twitter_cldr/resources/requirements/uca_requirement.rb,
lib/twitter_cldr/resources/properties/prop_list_importer.rb,
lib/twitter_cldr/resources/requirements/cldr_requirement.rb,
lib/twitter_cldr/resources/requirements/emoji_requirement.rb,
lib/twitter_cldr/resources/uli/segment_exceptions_importer.rb,
lib/twitter_cldr/resources/properties/age_property_importer.rb,
lib/twitter_cldr/resources/requirements/unicode_requirement.rb,
lib/twitter_cldr/resources/properties/jamo_property_importer.rb,
lib/twitter_cldr/resources/unicode_property_aliases_importer.rb,
lib/twitter_cldr/resources/properties/blocks_property_importer.rb,
lib/twitter_cldr/resources/properties/script_property_importer.rb,
lib/twitter_cldr/resources/requirements/dependency_requirement.rb,
lib/twitter_cldr/resources/properties/line_break_property_importer.rb,
lib/twitter_cldr/resources/properties/word_break_property_importer.rb,
lib/twitter_cldr/resources/properties/bidi_brackets_property_importer.rb,
lib/twitter_cldr/resources/properties/arabic_shaping_property_importer.rb,
lib/twitter_cldr/resources/properties/derived_core_properties_importer.rb,
lib/twitter_cldr/resources/properties/grapheme_break_property_importer.rb,
lib/twitter_cldr/resources/properties/sentence_break_property_importer.rb,
lib/twitter_cldr/resources/properties/unicode_data_properties_importer.rb,
lib/twitter_cldr/resources/properties/east_asian_width_property_importer.rb,
lib/twitter_cldr/resources/properties/script_extensions_property_importer.rb,
lib/twitter_cldr/resources/properties/hangul_syllable_type_property_importer.rb,
lib/twitter_cldr/resources/properties/indic_syllabic_category_property_importer.rb,
lib/twitter_cldr/resources/properties/indic_positional_category_property_importer.rb
Defined Under Namespace
Modules: Properties, Requirements, Uli
Classes: AliasesImporter, BidiTestImporter, CasefolderClassGenerator, CollationTestsImporter, CollationTriesImporter, CurrencySymbolsImporter, HyphenationImporter, ImportResolver, Importer, LanguageCodesImporter, Loader, LocalesResourcesImporter, NumberFormats, NumberFormatsImporter, PostalCodesImporter, RbnfTestImporter, ReadmeAssertionFailure, ReadmeRenderer, RegexpAstGenerator, ResourceLoadError, SegmentTestsImporter, TailoringImporter, TransformTestImporter, TransformsImporter, UnicodeDataImporter, UnicodeFileParser, UnicodePropertyAliasesImporter, ValidityDataImporter
Class Method Summary
collapse
Class Method Details
.importer_classes ⇒ Object
95
96
97
98
99
100
|
# File 'lib/twitter_cldr/resources.rb', line 95
def importer_classes
@importer_classes ||=
standard_importer_classes +
uli_importer_classes +
property_importer_classes
end
|
.importer_classes_for_ruby_engine ⇒ Object
102
103
104
105
106
107
108
109
110
111
112
113
|
# File 'lib/twitter_cldr/resources.rb', line 102
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 ⇒ Object
115
116
117
118
119
|
# File 'lib/twitter_cldr/resources.rb', line 115
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 ⇒ Object
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/twitter_cldr/resources.rb', line 71
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 ⇒ Object
these importer class methods aren’t constants in order to avoid loading all the classes when the library is required
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/twitter_cldr/resources.rb', line 41
def standard_importer_classes
@standard_importer_classes ||= [
AliasesImporter,
BidiTestImporter,
CasefolderClassGenerator,
CollationTestsImporter,
CollationTriesImporter,
CurrencySymbolsImporter,
HyphenationImporter,
LanguageCodesImporter,
LocalesResourcesImporter,
NumberFormatsImporter,
PostalCodesImporter,
RbnfTestImporter,
SegmentTestsImporter,
TailoringImporter,
TransformsImporter,
TransformTestImporter,
UnicodeDataImporter,
UnicodePropertyAliasesImporter,
ValidityDataImporter,
]
end
|
.uli_importer_classes ⇒ Object
65
66
67
68
69
|
# File 'lib/twitter_cldr/resources.rb', line 65
def uli_importer_classes
@uli_importer_classes ||= [
Uli::SegmentExceptionsImporter
]
end
|