Hello,
I've put together a new fifa gem / library [1]
that includes all the world's football countries and codes
(incl. non-member countries and irregular codes).
For example, to get a list of all countries use:
pp Fifa.countries
printing:
[#<Country @fifa="AFG", @key="af", @name="Afghanistan">,
#<Country @fifa="ALB", @key="al", @name="Albania">,
#<Country @fifa="ALG", @key="dz", @name="Algeria">,
#<Country @fifa="ASA", @key="as", @name="American Samoa">,
#<Country @fifa="AND", @key="ad", @name="Andorra">,
#<Country @fifa="ANG", @key="ao", @name="Angola">,
#<Country @fifa="AIA", @key="ai", @name="Anguilla">,
#<Country @fifa="ATG", @key="ag", @name="Antigua and Barbuda">,
#<Country @fifa="ARG", @key="ar", @name="Argentina">,
#<Country @fifa="ARM", @key="am", @name="Armenia">,
#<Country @fifa="ARU", @key="aw", @name="Aruba">,
#<Country @fifa="AUS", @key="au", @name="Australia">,
#<Country @fifa="AUT", @key="at", @name="Austria">,
#<Country @fifa="AZE", @key="az", @name="Azerbaijan">,
...
]
or to lookup England use:
```ruby
eng = Fifa['ENG']
# -or-
eng = Fifa['eng']
eng = Fifa[:eng]
eng.key #=> "eng"
eng.name #=> "England"
eng.fifa #=> "ENG"
# ...
``
Happy data wrangling with ruby. Enjoy the beautiful game. Cheers. Prost.