#Define Method to search for symbols in symbols.txt file
def search_answer_for body
message = " "
array_of_lines = IO.readlines("symbols.txt")
array_of_lines.each do |line|
items=[ ]
items=line.split ("=")
symbols=items[0]
answers=items[1]
if body.include?symbols.to_s
message = items[1]
end
end
return message.to_s
end
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .