You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ip_address.rb
    path of file: ./repos/geocoder/lib/geocoder
    
    the code of the file until where you have to start completion: require 'resolv'
module Geocoder
  class IpAddress < String
    PRI
    
    def initialize(ip)
      ip = ip.to_string if ip.is_a?(IPAddr)
      if ip.is_a?(Hash)
        super(**ip)
      else
        super(ip)
      end