method

new

v2_4_6 - Show latest stable - Class: Resolv::IPv4
new(address)
public

No documentation available.

# File lib/resolv.rb, line 2380
    def initialize(address) # :nodoc:
      unless address.kind_of?(String)
        raise ArgumentError, 'IPv4 address must be a string'
      end
      unless address.length == 4
        raise ArgumentError, "IPv4 address expects 4 bytes but #{address.length} bytes"
      end
      @address = address
    end