Module: CldrExportPatch

Defined in:
lib/twitter_cldr/resources/locales_resources_importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cldr_requirementObject

Returns the value of attribute cldr_requirement.



22
23
24
# File 'lib/twitter_cldr/resources/locales_resources_importer.rb', line 22

def cldr_requirement
  @cldr_requirement
end

Instance Method Details

#cldr_localesObject



35
36
37
# File 'lib/twitter_cldr/resources/locales_resources_importer.rb', line 35

def cldr_locales
  @cldr_locales ||= {}
end

#locales(locale, component, options) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/twitter_cldr/resources/locales_resources_importer.rb', line 24

def locales(locale, component, options)
  cldr_locales[locale] ||= TwitterCldr::Resources::CldrLocale.new(locale, cldr_requirement)
  ancestors = cldr_locales[locale].ancestors.map(&:to_sym)

  if !should_merge_root?(locale, component, options)
    ancestors.delete(:root)
  end

  ancestors
end