| Class | Dnsruby::Name |
| In: |
lib/Dnsruby/name.rb
|
| Parent: | Object |
A representation of a DNS name (RFC1035, section 3.1)
| MaxNameLength | = | 255 |
| == | -> | eql? |
| labels | [RW] |
Creates a new Dnsruby::Name from arg. arg can be :
Tests subdomain-of relation : returns true if this name is a subdomain of other.
domain = Resolv::Name.create("y.z")
p Resolv::Name.create("w.x.y.z").subdomain_of?(domain) #=> true
p Resolv::Name.create("x.y.z").subdomain_of?(domain) #=> true
p Resolv::Name.create("y.z").subdomain_of?(domain) #=> false
p Resolv::Name.create("z").subdomain_of?(domain) #=> false
p Resolv::Name.create("x.y.z.").subdomain_of?(domain) #=> false
p Resolv::Name.create("w.z").subdomain_of?(domain) #=> false