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.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/maxmind/geoip2/record/place.rb', line 19 def name n = names return nil if n.nil? @locales.each do |locale| return n[locale] if n.key?(locale) end nil end |