Project

iso3166_ru

0.0
No commit activity in last 3 years
No release in over 3 years
Lets you find country names in English and Russian, based on country codes (and vice versa)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 5.0.6
>= 0
 Project Readme

ISO 3166-1 Country List in English and Russian

Build Status Code Climate

Installation

Add this line to your application's Gemfile:

gem 'iso3166_ru', '~> 0.2.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install iso3166_ru

Usage

Country finders

Iso3166Ru.find_by(alpha2: "RU")
Iso3166Ru.find_by(alpha3: "RUS")
Iso3166Ru.find_by(name: "Россия")
Iso3166Ru.find_by(full_name: "Российская Федерация")
Iso3166Ru.find_by(english: "Russian Federation")
Iso3166Ru.find_by(iso: "643")

All finders return an Iso3166Ru::Country struct.

Country

country = Iso3166Ru.find_by(alpha2: "RU")

country.alpha2             #=> "RU"
country.alpha3             #=> "RUS"
country.name               #=> "Россия"
country.full_name          #=> "Российская Федерация"
country.english            #=> "Russian Federation"
country.iso                #=> "643"
country.location           #=> "Европа"
country.location_precise   #=> "Восточная Европа"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request