Skip to content

Instantly share code, notes, and snippets.

@mattscilipoti
Created October 16, 2009 21:17
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 mattscilipoti/212080 to your computer and use it in GitHub Desktop.
Save mattscilipoti/212080 to your computer and use it in GitHub Desktop.
Transform /^table:.*$/ do |table|
#convert empty strings to nil (reverses #470)
table.hashes.each do |hash|
hash.each do |key, value|
hash[key] = value.empty? ? nil : value
end
end
table
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment