You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: earth_rotation.rb
    path of file: ./repos/Ruby_on_Rails/3D Earth Rotation
    
    the code of the file until where you have to start completion: # You'll need to install the rubycocoa gem. You can install it by running gem install rubycocoa in yo
    
  def rotate_earth
    frame_count = 180
    frame_delay = ROTATION_INTERVAL

    script = <<~SCRIPT
      var frame = 0;
      function updateRotation() {
        var marker = document.getElementById('earth-marker');
        marker.style.transform = 'rotate(' + frame + 'deg)';
        frame += 2;
        if (frame > 360) {
          frame = 0;
        }
      }
      setInterval(updateRotation, #{frame_delay});
    SCRIPT

    @web_view.stringByEvaluatingJavaScriptFromString(script)
  end
end