Class: Ipregistry::Models::Country

Inherits:
Base
  • Object
show all
Defined in:
lib/ipregistry/models/location.rb

Overview

Country-level information for a location.

Instance Method Summary collapse

Methods inherited from Base

#==, #[], #hash, #initialize, #inspect, #to_h

Constructor Details

This class inherits a constructor from Ipregistry::Models::Base

Instance Method Details

#bordersArray<String>

ISO 3166-1 alpha-2 codes of bordering countries.

Returns:

  • (Array<String>)


41
42
43
44
# File 'lib/ipregistry/models/location.rb', line 41

def borders
  value = @data["borders"]
  value.is_a?(Array) ? value : []
end