[ruby] Best practices with STDIN in Ruby?