Script showing usage of respont_to and next in Ruby