Method: I18n::Inflector::API_Strict#each_inflected_locale
- Defined in:
- lib/i18n-inflector/api_strict.rb
permalink #each_inflected_locale ⇒ LazyArrayEnumerator #each_inflected_locale(kind) ⇒ LazyArrayEnumerator Also known as: each_locale, each_supported_locale
Iterates through locales which have configured strict inflection support.
142 143 144 145 146 147 |
# File 'lib/i18n-inflector/api_strict.rb', line 142 def each_inflected_locale(kind=nil, &block) kind = kind.to_s.empty? ? nil : kind.to_sym i = @lazy_locales.reject { |lang,data| data.empty? } i = i.select { |lang,data| data.has_kind?(kind) } unless kind.nil? i.each_key(&block) end |