ip?

addrinfo.ip? => true or false
Instance Public methods

returns true if addrinfo is internet (IPv4/IPv6) address. returns false otherwise.

Addrinfo.tcp("127.0.0.1", 80).ip? #=> true
Addrinfo.tcp("::1", 80).ip?       #=> true
Addrinfo.unix("/tmp/sock").ip?    #=> false
doc_ruby_on_rails
2015-03-30 06:22:03
Comments
Leave a Comment

Please login to continue.