Skip to content

Instantly share code, notes, and snippets.

@wbednarski
Created January 2, 2013 15:17
Show Gist options
  • Save wbednarski/4435297 to your computer and use it in GitHub Desktop.
Save wbednarski/4435297 to your computer and use it in GitHub Desktop.
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