fixes comments

This commit is contained in:
kikito
2015-12-21 17:10:07 +01:00
parent 57e72206d2
commit d8e6584bfe

View File

@@ -23,10 +23,10 @@ class CensusApi
letter = nil letter = nil
end end
document_number = document_number.last(8) # Keep only the last 7 digits document_number = document_number.last(8) # Keep only the last x digits
document_number = document_number.gsub(/^0+/, '') # Removes leading zeros document_number = document_number.gsub(/^0+/, '') # Removes leading zeros
# if the number has less than 7 digits, pad with zeros to the left and add each variant to the list # if the number has less digits than it should, pad with zeros to the left and add each variant to the list
# For example, if the initial document_number is 1234, possible numbers should have # For example, if the initial document_number is 1234, possible numbers should have
# [1234, 01234, 001234, 0001234] # [1234, 01234, 001234, 0001234]
possible_numbers = [] possible_numbers = []