Module: QAT::Utils::Network
Overview
This module gives helper methods for IP handling and/or validation
Instance Method Summary collapse
-
#is_ip?(ip) ⇒ Boolean
Validates if
ip
is a valid IP Address.
Instance Method Details
#is_ip?(ip) ⇒ Boolean
Validates if ip
is a valid IP Address.
11 12 13 |
# File 'lib/qat/utils/network.rb', line 11 def is_ip?(ip) !!IPAddr.new(ip) rescue false end |