Sha256: 8782a104653408c4e838465393a004022913bd007e3888e72e74fecc222d2091

Contents?: true

Size: 620 Bytes

Versions: 4

Compression:

Stored size: 620 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Js
    module Renderers
      module Shared
        class PostalCodesRenderer < TwitterCldr::Js::Renderers::Base
          set_template "mustache/shared/postal_codes.coffee"

          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
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter_cldr_js-2.4.0 lib/twitter_cldr/js/renderers/shared/postal_codes_renderer.rb
twitter_cldr_js-2.3.2 lib/twitter_cldr/js/renderers/shared/postal_codes_renderer.rb
twitter_cldr_js-2.3.1 lib/twitter_cldr/js/renderers/shared/postal_codes_renderer.rb
twitter_cldr_js-2.3.0 lib/twitter_cldr/js/renderers/shared/postal_codes_renderer.rb