Class: MonoVM::Whois::Availability::Rules::AvailabilityKeywords
- Inherits:
-
MonoVM::Whois::Availability::Rule
- Object
- MonoVM::Whois::Availability::Rule
- MonoVM::Whois::Availability::Rules::AvailabilityKeywords
- Defined in:
- lib/monovm/whois/availability/rules/availability_keywords.rb
Overview
Plain-language phrases that state a name is unregistered.
The list spans several languages, because ccTLD registries answer in their
own: no se encontro el objeto, nicht vergeben, is vrij. Matching is a
substring search over the commentary-stripped response — the stripping is
what keeps a phrase like "not found" in a registry's legal preamble from
being read as an answer.
Instance Method Summary collapse
Methods inherited from MonoVM::Whois::Availability::Rule
Instance Method Details
#call(context) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/monovm/whois/availability/rules/availability_keywords.rb', line 17 def call(context) return nil if context.empty? keyword = context.find_keyword(Patterns::AVAILABILITY_KEYWORDS) return nil if keyword.nil? available( reason: "the response states the name is not registered", evidence: keyword ) end |