lib/zip_check.rb in my-congress-0.2.2 vs lib/zip_check.rb in my-congress-0.2.3
- old
+ new
@@ -1,13 +1,13 @@
-
-
class ZipCheck
- def initialize(zip)
- if zip.length != 5 || zip.scan(/[0-9]{5}/)[0].length != 5
- puts "Zip Code is Invalid. Press 'Enter' to return to Main Menu.".colorize(:blue)
- nothing = gets.chomp
- MCongress.new.call
+ def initialize(address)
+ if address[:zip].length != 5 || address[:zip].scan(/[0-9]{5}/)[0].length != 5
+ puts " "
+ puts " "
+ prompt = TTY::Prompt.new
+ prompt.keypress("Invalid Zip Code. Press any key to return to Main Menu.")
+ MyCongress.new.call
end
end
end
\ No newline at end of file