public
Created

  • Download Gist
read_README.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.