Sha256: 4e75bbcd9b39e20a0abd949a276ac94931d563ca00be643075faf247b5e49601
Contents?: true
Size: 305 Bytes
Versions: 1
Compression:
Stored size: 305 Bytes
Contents
module ValidatesHost class Subnet def initialize(subnet) @subnet = subnet end def valid? return true if @subnet.blank? @subnet =~ /^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}\/(2[4-9]|30)$/ end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
validates_host-1.1.0 | lib/validates_host/subnet.rb |