Permalink
Browse files

Added SwissMatch::ZipCode#two_digit_add_on.

  • Loading branch information...
apeiros committed Apr 3, 2013
1 parent 8defb59 commit cf521527fa9c413d21f18e8f2ab0a4befeb8c162
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/swissmatch/zipcode.rb
@@ -143,6 +143,12 @@ def initialize(
@valid_until = valid_until
end
+ # @return [String]
+ # The zip code add-on as 2 digit string, with leading zeros if necessary
+ def two_digit_add_on
+ "%02d" % @add_on
+ end
+
# @return [Array<String>]
# The name of this zip code in all languages and normalizations (only unique values)
def transliterated_names

0 comments on commit cf52152

Please sign in to comment.