Sha256: 130c45d8c946f73b1119257f1b13ef76402e0f6967bb4b23c153238cd458d834
Contents?: true
Size: 302 Bytes
Versions: 1
Compression:
Stored size: 302 Bytes
Contents
module GeoNamesAPI class Country < GeoNamesAPI::Object METHOD = "countryInfoJSON" ID = ["country"] def self.all where.collect { |response| new(response) } end def self.where(params={}) JSON.load(open(url(params)).read)["geonames"] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geonames_api-0.0.2 | lib/geonames_api/country.rb |