Provide helpers and selectors for an English country and language list based on a csv file.
Based on: https://github.com/ikuseiGmbH/csv_country_selector
Add this line to your application's Gemfile:
gem 'csv_country_selector_en'
And then execute:
$ bundle
Or install it yourself as:
$ gem install csv_country_selector_en
CsvCountrySelectorEn::Country.short_for("Germany") => "DE"
CsvCountrySelectorEn::Country.long_for("DE") => "Germany"
CsvCountrySelectorEn::Country.short_list => ["DE", "DK", "EE", ...]
CsvCountrySelectorEn::Country.long_list => ["Germany", "Denmark", "Estonia", ...]
CsvCountrySelectorEn::Country.codes => { de: "Germany", dk: "Denmark", ee: "Estonia", ... }
CsvCountrySelectorEn::Country.is_in_eu?("de") => true
CsvCountrySelectorEn::Country.is_in_eu?("DE") => true
CsvCountrySelectorEn::Country.is_in_eu?("US") => false
The gem is available as open source under the terms of the MIT License.