Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added SwissMatch::ZipCode#two_digit_add_on.

  • Loading branch information...
commit cf521527fa9c413d21f18e8f2ab0a4befeb8c162 1 parent 8defb59
@apeiros authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/swissmatch/zipcode.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.