cymruwhois is a simple Ruby module that utilizes Team Cymru's IP to ASN Mapping via DNS queries. The module was conceived as an IP geolocation alternative to GeoIP. Kindly take note of Team Cymru's "Special Notice" for bulk queries at the top of the page: http://www.team-cymru.org/Services/ip-to-asn.html
Gemfile gem 'cymruwhois', '~> 0.1.0'
install gem install cymruwhois