Created
May 27, 2009 09:27
-
-
Save ocean/118545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#results.each do |row| | |
results.each_hash do |row| | |
# 'collect' enables handling of NULL/nil values | |
row = row.collect { |v| v.nil? ? "" : v } | |
#fname = row[0] + ".html" | |
fname = row["ID"] + ".html" | |
open(fname, 'w') do |f| | |
f.puts "<strong>Defendant</strong><br>" | |
#f.puts row[1] + "</p>" | |
f.puts row["Defendant"] + "</p>" | |
f.puts "<p><strong>Trading Name</strong><br>" | |
#f.puts row[0] + "</p>" | |
f.puts row["Trading_Name"] + "</p>" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment