I need help with a save function for my rock paper scissors game. Please help?

Hey, am having the worst time trying to figure out how to make the save function work for my rock paper scissors game using yaml, could anyone help me? link to code is below.

rock paper scissors

Hello, please take a look at solutions of https://www.theodinproject.com/courses/ruby-programming/lessons/file-i-o-and-serialization-ruby-programming
Below the task description there’s a list of student’s solutions, quite a few contain save functionality that is really similar to the one you ask for.