Created
January 2, 2013 15:17
-
-
Save wbednarski/4435297 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_readme? | |
while true | |
print 'Did you read README.md? [y/n]: ' | |
case gets.strip | |
when 'y', 'Y', 'yes' | |
puts 'Awesome!' | |
break | |
when /\A[nN]o?\Z/ | |
puts 'Here you go!' | |
system('less README.md') | |
# if system('less') && $? == 0 | |
# puts 'Something went wrong while opening README.md. (less README.md)' | |
# exit 1 | |
# else | |
# exit 0 | |
# end | |
else | |
exit 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment