Check piped STDIN in Ruby Shell Scripts without Prompting

I was writing a small shell script in Ruby today that needed to check STDIN for data, but I didn't want to prompt the user to enter data when nothing was found (I only wanted piped in data). This turned out to involve a little more effort than just checking STDIN.read.

Luckily, I found a solution at Footle that worked out great. Heres to anyone who needs only piped in data from STDIN without prompting the user.