Are you sure?
def are_you_sure? while true print "Are you sure? [y/n]: " response = gets case response when /^[yY]/ return true when /^[nN]/ return false end end end
I’m rather enjoying this.. ;)
Straight outa the foothills of Vermont.
def are_you_sure? while true print "Are you sure? [y/n]: " response = gets case response when /^[yY]/ return true when /^[nN]/ return false end end end
I’m rather enjoying this.. ;)
No comments yet.
RSS feed for comments on this post. TrackBack URI