Method: I18n::Inflector::API_Strict#add_database
- Defined in:
- lib/i18n-inflector/api_strict.rb
permalink #add_database(db) ⇒ I18n::Inflector::InflectionData_Strict
Note:
It doesn’t create copy of inflection database, it registers the given object.
Attaches InflectionData_Strict instance to the current object.
87 88 89 90 91 92 93 |
# File 'lib/i18n-inflector/api_strict.rb', line 87 def add_database(db) return nil if db.nil? locale = prep_locale(db.locale) delete_database(locale) @inflected_locales_cache.clear @idb[locale] = db end |