Class: MonoVM::Whois::Availability::Rules::StatusField
- Inherits:
-
MonoVM::Whois::Availability::Rule
- Object
- MonoVM::Whois::Availability::Rule
- MonoVM::Whois::Availability::Rules::StatusField
- Defined in:
- lib/monovm/whois/availability/rules/status_field.rb
Overview
An explicit status field stating the name is free.
Some detectors pair this check with a second inference: "fewer than two registration fields present" also counts as availability. That inference is unsound and is deliberately not reproduced. Every response that is not a record has fewer than two registration fields — a rate-limit notice, a blocked-client message, a legal preamble, a truncated read — so it converts any non-answer into "free to register".
Genuine availability always carries a positive signal, and the keyword, not-found and per-TLD rules already look for it. The one case where silence really is the only signal is handled by Recordless, which requires an explicit per-TLD opt-in.
Instance Method Summary collapse
Methods inherited from MonoVM::Whois::Availability::Rule
Instance Method Details
#call(context) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/monovm/whois/availability/rules/status_field.rb', line 23 def call(context) return nil if context.empty? # An error or restriction notice can contain a status line while still # describing something that exists. return nil if context.match?(Patterns::ERROR_OR_RESTRICTION, source: :significant) matched = context.find(Patterns::STATUS_AVAILABLE, source: :significant) return nil if matched.nil? available( reason: "an explicit status field reports the name as available", evidence: matched ) end |