is_ipv4 method

bool is_ipv4()

True if the object is an IPv4 address

ip = IPAddress("192.168.10.100/24")

ip.ipv4? //-> true

Implementation

bool is_ipv4() {
  return this.ip_bits.version == IpVersion.V4;
}