lib/hangman/game.rb
# saves Word object containing all game info using ruby's PStore
saves Word object containing all game info using ruby's PStore
saves Word object containing all game info using ruby ' s PStore
def save_game
      store = PStore.new('data.pstore')
      store.transaction do
        store[:saved_game] = @playing_word
      end
      puts 'Game saved successfully!'
    end
def save_game store = PStore . new ( 'data.pstore' ) store . transaction do store [ :saved_game ] = @playing_word end puts 'Game saved successfully!' end
saves Word object containing all game info using ruby's PStore
saves Word object containing all game info using ruby ' s PStore