Class: MaxMind::GeoIP2::Record::Place
- Inherits:
-
Abstract
- Object
- Abstract
- MaxMind::GeoIP2::Record::Place
- Defined in:
- lib/maxmind/geoip2/record/place.rb
Overview
Location data common to different location types.
Direct Known Subclasses
Instance Method Summary collapse
-
#name ⇒ String?
The first available localized name in order of preference.
Instance Method Details
#name ⇒ String?
The first available localized name in order of preference.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/maxmind/geoip2/record/place.rb', line 39 def name n = names return nil if n.nil? @locales.each do |locale| return n[locale] if n.key?(locale) end nil end |