Skip to content

Commit

Permalink
Conditional nil-ifying values
Browse files Browse the repository at this point in the history
  • Loading branch information
lukes committed Apr 10, 2018
1 parent 2ebb806 commit b8b0c1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scrubber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@

# Ensure they have all the keys (we'll write them to the data files with blank values)
blanks.map! do |c|
c["region"] = c["sub-region"] = c["intermediate-region"] = c["region-code"] = c["sub-region-code"] = c["intermediate-region-code"] = nil
c["region"] ||= nil
c["sub-region"] ||= nil
c["intermediate-region"] ||= nil
c["region-code"] ||= nil
c["sub-region-code"] ||= nil
c["intermediate-region-code"] ||= nil
c
end

Expand Down

0 comments on commit b8b0c1b

Please sign in to comment.