How to enter values, save them to a new file and search for the values in the file <p>I have a school assignment that I need help with. This is the description of the assignment:</p> <p>Ruby program that can hold these values:</p> <ul> <li>Artifacts</li> <li>Values</li> <li>Assumptions</li> </ul> <p>It shall be possible for a user:</p> <ul> <li>To enter these three types of values.</li> <li>Search for a value of type Artifacts, Values or Assumptions.</li> <li>The program shall use loops and at least one class definition.</li> </ul> <p>The only function that won't work out for me are these lines:</p> <pre><code>f= File.new("Artefacts", "r") puts "Search for information regarding cultural information" userinput = gets.chomp if File.readlines("Artefacts").include?('userinput') puts "We have found your input." else puts "We have not found your input." f.close </code></pre> <p>No matter what the user inserts, it only displays "We have not found your input".</p>