title: Ruby Script to Create an Array of Arrays
body: <p>I have written a simple screen scraping script and at the end of the script I am attempting to create an array of arrays in preparation for an activerecord insert.  The structure I am trying to achieve is as follows:</p>
  
  <p>Array b holds a series of 10 element arrays</p>
  
  <pre><code>b = [[0,1,2,3,4,5,6,7,8,9],[0,1,2,3,4,5,6,7,8,9],[0,1,2,3,4,5,6,7,8,9]]
  </code></pre>
  
  <p>Currently when I try to print out Array b the array is empty.   I'm still fairly new to ruby and programming for that matter and would appreciate any feedback on how to get values in array b and to improve the overall script.  Script follows:</p>
  
  <pre><code>require "rubygems"  
  require "celerity"
  t = 0
  r = 0
  c = 0
  a = Array.new(10)
  b = Array.new
  
    #initialize Browser
    browser = Celerity::IE.new
    #goto Login Page
    browser.goto('http://www1.drf.com/drfLogin.do?type=membership')
    #input UserId and Password
    browser.text_field(:name, 'p_full_name').value = 'username'
    browser.text_field(:name, 'p_password').value = 'password'
    browser.button(:index, 2).click
    #goto DRF Frontpage
    browser.goto('http://www.drf.com/frontpage')
    #goto DRF Entries
    browser.goto('http://www1.drf.com/static/indexMenus/eindex.html')
    #click the link to access the entries
    browser.link(:text, '09').click
  
    browser.tables.each do |table|
      t = t + 1
        browser.table(:index, t).rows.each do |row| 
          r = r + 1
            browser.table(:index, t).row(:index, r).cells.each do |cell|
              a &lt;&lt; cell.text
            end
            b &lt;&lt; a
            a.clear         
        end
        r = 0
    end
    puts b
    browser.close
  </code></pre>