Class: TwitterCldr::Js::Renderers::Implementation::Shared::PostalCodesRenderer

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter_cldr/js/renderers/implementation/shared/postal_codes_renderer.rb

Instance Attribute Summary

Attributes inherited from Base

#locale

Instance Method Summary collapse

Methods inherited from Base

#initialize, set_template

Constructor Details

This class inherits a constructor from TwitterCldr::Js::Renderers::Base

Instance Method Details

#postal_codesObject



14
15
16
17
18
19
# File 'lib/twitter_cldr/js/renderers/implementation/shared/postal_codes_renderer.rb', line 14

def postal_codes
  TwitterCldr::Shared::PostalCodes.territories.inject({}) do |ret, country_code|
    ret[country_code] = "^#{TwitterCldr::Shared::PostalCodes.for_territory(country_code).regexp.source}$"
    ret
  end.to_json
end