module NaturalEarth::Countries

Public Class Methods

[](iso3166_1)
Alias for: fetch
fetch(iso3166_1) click to toggle source
# File lib/natural_earth/countries.rb, line 17
def fetch(iso3166_1)
  raise KeyError unless supported?(iso3166_1)

  NaturalEarth::Country.new(COUNTRIES[normalize(iso3166_1)])
end
Also aliased as: []
key?(iso3166_1)
Alias for: supported?
keys()
Alias for: supported
supported() click to toggle source
# File lib/natural_earth/countries.rb, line 9
def supported
  COUNTRIES.keys
end
Also aliased as: keys
supported?(iso3166_1) click to toggle source
# File lib/natural_earth/countries.rb, line 13
def supported?(iso3166_1)
  COUNTRIES.key?(normalize(iso3166_1))
end
Also aliased as: key?