title: How to Get line number of a word in file using ruby
body: <p>suppose I have a file. I want to write a function that takes file and word. And returns the line numbers of that word </p>
  
  <pre><code>def get_line_number(file, word)
   #logic
   return line_num
  end 
  </code></pre>