yhirose / maxminddb

Pure Ruby GeoIP2 MaxMind DB reader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

most_general method on subdivisions

abigailfoster opened this issue · comments

We often need to know only the first subdivision, if any, returned by the lookup. I love that you've implemented a most_specific method so that it isn't necessary to guard for nil in that case. Would a most_general (or least_specific) method be a common enough use case to merge into the core project as well?

@jamesfoster85, most_specific method is provided with the PR #31 by @f3ndot. I personally don't use the subdivision values. But if many people think the methods are common enough, I don't mind to accept a new pull request implementing them. Thanks!