class

GeoIP2::Database

Inherits Reference / Object

Constructors

new(db : String | Bytes | IO::Memory, locales : Array(String))
Source

Instance methods

anonymous_ip(ip_address : String) : Model::AnonymousIp

Returns Model::AnonymousIp or raises AddressNotFoundError if ip_address is not in the database

Source
anonymous_ip?(ip_address : String) : Model::AnonymousIp | Nil

Returns Model::AnonymousIp or nil if ip_address is not in the database

Source
asn(ip_address : String) : Model::Asn

Returns Model::Asn or raises AddressNotFoundError if ip_address is not in the database

Source
asn?(ip_address : String) : Model::Asn | Nil

Returns Model::Asn or nil if ip_address is not in the database

Source
city(ip_address : String) : Model::City

Returns Model::City or raises AddressNotFoundError if ip_address is not in the database

Source
city?(ip_address : String) : Model::City | Nil

Returns Model::City or nil if ip_address is not in the database

Source
connection_type(ip_address : String) : Model::ConnectionType

Returns Model::ConnectionType or raises AddressNotFoundError if ip_address is not in the database

Source
connection_type?(ip_address : String) : Model::ConnectionType | Nil

Returns Model::ConnectionType or nil if ip_address is not in the database

Source
country(ip_address : String) : Model::Country

Returns Model::Country or raises AddressNotFoundError if ip_address is not in the database

Source
country?(ip_address : String) : Model::Country | Nil

Returns Model::Country or nil if ip_address is not in the database

Source
density_income(ip_address : String) : Model::DensityIncome

Returns Model::DensityIncome or raises AddressNotFoundError if ip_address is not in the database

Source
density_income?(ip_address : String) : Model::DensityIncome | Nil

Returns Model::DensityIncome or nil if ip_address is not in the database

Source
domain(ip_address : String) : Model::Domain

Returns Model::Domain or raises AddressNotFoundError if ip_address is not in the database

Source
domain?(ip_address : String) : Model::Domain | Nil

Returns Model::Domain or nil if ip_address is not in the database

Source
enterprise(ip_address : String) : Model::Enterprise

Returns Model::Enterprise or raises AddressNotFoundError if ip_address is not in the database

Source
enterprise?(ip_address : String) : Model::Enterprise | Nil

Returns Model::Enterprise or nil if ip_address is not in the database

Source
isp(ip_address : String) : Model::Isp

Returns Model::Isp or raises AddressNotFoundError if ip_address is not in the database

Source
isp?(ip_address : String) : Model::Isp | Nil

Returns Model::Isp or nil if ip_address is not in the database

Source
metadata
Source
user_count(ip_address : String) : Model::UserCount

Returns Model::UserCount or raises AddressNotFoundError if ip_address is not in the database

Source
user_count?(ip_address : String) : Model::UserCount | Nil

Returns Model::UserCount or nil if ip_address is not in the database

Source