Currently I am doing this:
badLinks = Array.new
badLinksFile = File.new(arrayFilePath + 'badLinks.txt', 'w+')
badLinksFile.puts badLinks.to_json
The array badLinks contains the hashes and is:
brokenLink = Hash.new
brokenLink[:onPage] = @lastPage
brokenLink[:link] = @nextPage
badLinks.push(brokenLink)
When I look at the file it is empty. Should this work?
badLinksFileandbadLinks? A file and an array respectively? Show them in your code please, along with how you openbadLinksFile.