Class: MaxMindDB::Result::Subdivisions
- Inherits:
-
Array
- Object
- Array
- MaxMindDB::Result::Subdivisions
- Defined in:
- lib/maxminddb/result/subdivisions.rb
Instance Method Summary collapse
-
#initialize(raw) ⇒ Subdivisions
constructor
A new instance of Subdivisions.
- #inspect ⇒ Object
- #most_specific ⇒ Object
Constructor Details
#initialize(raw) ⇒ Subdivisions
Returns a new instance of Subdivisions.
4 5 6 |
# File 'lib/maxminddb/result/subdivisions.rb', line 4 def initialize(raw) super((raw || []).map { |hash| NamedLocation.new(hash) }) end |
Instance Method Details
#inspect ⇒ Object
12 13 14 |
# File 'lib/maxminddb/result/subdivisions.rb', line 12 def inspect "#<MaxMindDB::Result::Subdivisions: #{super}>" end |
#most_specific ⇒ Object
8 9 10 |
# File 'lib/maxminddb/result/subdivisions.rb', line 8 def most_specific last || NamedLocation.new({}) end |