Update examples/example.rb

Added loop to check status till complete