Class: Barometer::Query::Format::Ipv4Address
- Defined in:
- lib/barometer/query/formats/ipv4_address.rb
Overview
eg. 8.8.8.8
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.is?(query) ⇒ Boolean
10 11 12 13 |
# File 'lib/barometer/query/formats/ipv4_address.rb', line 10 def self.is?(query) (ipaddr = IPAddr.new(query.to_s)) && ipaddr.ipv4? rescue ArgumentError end |