I'm going through a file line by line and looking for the word "BIOS" in each line because each line that contains the word BIOS has a version number I need. After I see that the line contains the word "BIOS" I want to take the entire line, and split it into an array. Here's my code:
File.open(file).each do |line|
if line.includes? 'BIOS'
array = line.split(" ")
end
end
The problem I'm having is that I keep getting an error, saying that "includes?" is an undefined method. Is there a better way to parse each line of this file for a specific string?