Last active
August 29, 2015 14:01
-
-
Save markedmondson/75ace94346e7daf88d60 to your computer and use it in GitHub Desktop.
Level++
This file contains hidden or 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
state_counts = [ | |
OpenStruct.new(name: "BC", country: "Canada", count: 5), | |
OpenStruct.new(name: "Ontario", country: "CA", count: 15), | |
OpenStruct.new(name: "QC", country: nil, count: 25), | |
OpenStruct.new(name: "Oregon", country: "USA", count: 35), | |
OpenStruct.new(name: "WA", country: "United States", count: 45), | |
OpenStruct.new(name: "CA", country: nil, count: 55), | |
OpenStruct.new(name: "WA", country: "Australia", count: 65) | |
] | |
canada = OpenStruct.new(name: "Canada", iso: "CA", iso3: "CAN") | |
usa = OpenStruct.new(name: "United States", iso: "US", iso3: "USA") | |
australia = OpenStruct.new(name: "Australia", iso: "AU", iso3: "AUS") | |
# => {bc => 5, on => 15, qc => 25, or => 35, wa => 45, ca => 55, wtf=> 65} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah it was more to ensure that "WA" wasn't being used as a state matcher for Washington.