Class: DomainSanity::Hostname
Overview
A candidate fully-qualified host name.
Constant Summary
Constants inherited
from Subject
Subject::TYPES
Instance Attribute Summary
Attributes inherited from Subject
#input, #policy
Instance Method Summary
collapse
#type_facts
Methods inherited from Subject
#ascii, for, #initialize, #ip?, #kind, #punycode?, #reasons, #reverse_zone?, #to_h, #type_facts, #unicode, #valid_wildcard?, #wildcard?
Instance Method Details
#hostname? ⇒ Boolean
134
135
136
|
# File 'lib/domain_sanity/subject.rb', line 134
def hostname?
true
end
|
#public_suffix ⇒ Object
146
147
148
|
# File 'lib/domain_sanity/subject.rb', line 146
def public_suffix
@norm.psl&.tld
end
|
#registrable_domain ⇒ Object
142
143
144
|
# File 'lib/domain_sanity/subject.rb', line 142
def registrable_domain
@norm.psl&.domain
end
|
#valid? ⇒ Boolean
138
139
140
|
# File 'lib/domain_sanity/subject.rb', line 138
def valid?
reasons.empty?
end
|