title: What are all the common ways to read a file in Ruby?
body: <p>What are all the common ways to read a file in Ruby?</p>
  
  <p>For instance, here is one method:</p>
  
  <pre><code>fileObj = File.new($fileName, "r")
  while (line = fileObj.gets)
    puts(line)
  end
  fileObj.close
  </code></pre>
  
  <p>I know Ruby is extremely flexible. What are the benefits/drawbacks of each approach?</p>