title: How to pass text file as an argument in Ruby
body: <p>I need to pass a text file as an argument instead of opening it inside the code. The content of the text file should print on console. I have done the following code:</p>
  
  <pre><code>File.open("test_list.txt").each do |line|
      puts line
  end
  </code></pre>
  
  <p>Please advice.</p>