Project

geolombia

0.0
No commit activity in last 3 years
No release in over 3 years
This gem gives you a list of all cities and states in Colombia and a few methods to work with them.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 0
 Project Readme

Geolombia

Build Status

Geolombia is a gem that has a list of all cities and states in Colombia.

Installation

Add this line to your application's Gemfile:

gem 'geolombia'

And then execute:

$ bundle

Or install it yourself as:

$ gem install geolombia

Documentation

This README is all the documentation I've written so far.

Usage

Geolombia::State.find_by_name("Antioquia")
# => #<Geolombia::State:0x00000100841240 @code="05", @name="Antioquia", @latitude=7.0, @longitude=-75.5>

Geolombia::State.find_by_name("Antioquia").cities
# => Array of the 125 cities in Antioquia

Geolombia::State.all
# => Array of the 32 states in Colombia

Geolombia::City.find_by_name("Medellín")
# => #<Geolombia::City:0x00000100a601e8 @code="05001", @name="Medellín", @state_code="05", @state_name="Antioquia", @latitude=6.2913889, @longitude=-75.5361111>

Geolombia::City.find_by_name("Medellín").state
# => #<Geolombia::State:0x00000100842c80 @code="05", @name="Antioquia", @latitude=7.0, @longitude=-75.5> 

Geolombia::City.all
# => Array of the 1102 cities in Colombia

Future Usage

Geolombia::City.where(:name => "Medellín").first

Geolombia::State.where(:name => "Antioquia").first.cities

Geolombia::City.first.state

Compatibility

This gem is currently only compatible with Ruby 1.9.3 and 2.0.0.

Contributing

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

Credits

Thanks to Jorge Iván Meza for his CSV data files .