Module: TwitterCldr::Collation::TrieLoader
- Defined in:
- lib/twitter_cldr/collation/trie_loader.rb
Overview
Builds a fractional collation elements Trie from the file containing a fractional collation elements table.
Constant Summary collapse
- DUMPS_DIR =
File.join(TwitterCldr::RESOURCES_DIR, 'collation', 'tries')
- DEFAULT_TRIE_LOCALE =
:default
Class Method Summary collapse
- .dump_path(locale) ⇒ Object
- .load_default_trie ⇒ Object
- .load_tailored_trie(locale, fallback) ⇒ Object
Class Method Details
.dump_path(locale) ⇒ Object
29 30 31 |
# File 'lib/twitter_cldr/collation/trie_loader.rb', line 29 def dump_path(locale) File.join(DUMPS_DIR, "#{locale}.dump") end |
.load_default_trie ⇒ Object
19 20 21 |
# File 'lib/twitter_cldr/collation/trie_loader.rb', line 19 def load_default_trie load_trie end |
.load_tailored_trie(locale, fallback) ⇒ Object
23 24 25 26 27 |
# File 'lib/twitter_cldr/collation/trie_loader.rb', line 23 def load_tailored_trie(locale, fallback) trie = load_trie(locale) trie.fallback = fallback trie end |