Sha256: 402c5ce64b1a0164faa58fd165f0da9cb0d08b332994abf705369d21bf086f2d
Contents?: true
Size: 261 Bytes
Versions: 1
Compression:
Stored size: 261 Bytes
Contents
module ValidatesHost class HostName def initialize(host_name) @host_name = host_name end def valid? return true if @host_name.blank? @host_name =~ /^[a-z][a-z0-9-]+$/ end def host_name @host_name end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
validates_host-1.0.0 | lib/validates_host/host_name.rb |