instance method
compute
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
compute(tags, include_defaults = true)
No documentation comment.
Parameters
-
tagsreq -
include_defaultsopt = true
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/fallbacks.rb, line 87
def compute(tags, include_defaults = true)
result = Array(tags).collect do |tag|
tags = I18n::Locale::Tag.tag(tag).self_and_parents.map! { |t| t.to_sym }
tags.each { |tag| tags += compute(@map[tag]) if @map[tag] }
tags
end.flatten
result.push(*defaults) if include_defaults
result.uniq
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/fallbacks.rb line 87
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Locale::Fallbacks