Skip to content

Instantly share code, notes, and snippets.

@djsun
Created March 5, 2010 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djsun/322893 to your computer and use it in GitHub Desktop.
Save djsun/322893 to your computer and use it in GitHub Desktop.
rows = []
tables.each do |table|
rows.concat(table.css("tr"))
end
rows
tables.reduce([]) { |rows, table| rows.concat(table.css("tr")) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment