title: How can I print contents of array in ruby
body: <p>Can anyone help. I have created a method in ruby capybara to find all link elements on a web page matching certain criteria and stored them in an array. I want to iterate through the items in the array and print them to the console. My code for doing this is : </p>
  
  <pre><code>case_list = []   
  case_list.push(results_page.list_cases.to_s)   
  case_list.each do |item|
       puts item   
  end 
  </code></pre>
  
  <p>but all I get printed is <code>#&lt;Capybara::Result:0x007fd0a4ef4350&gt;</code></p>