Class: Coppertone::Mechanism::Exists
- Inherits:
-
DomainSpecRequired
- Object
- Coppertone::Mechanism
- DomainSpecMechanism
- DomainSpecRequired
- Coppertone::Mechanism::Exists
- Defined in:
- lib/coppertone/mechanism/exists.rb
Overview
Implements the exists mechanism.
Instance Attribute Summary
Attributes inherited from DomainSpecMechanism
Attributes inherited from Coppertone::Mechanism
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from DomainSpecRequired
create, #handle_invalid_domain, #initialize, #match?
Methods inherited from DomainSpecMechanism
#==, #context_dependent?, dns_lookup_term?, #hash, #includes_ptr?, #target_domain, #target_name_from_domain_spec, #trim_domain_spec
Methods inherited from Coppertone::Mechanism
build, class_builder, #context_dependent?, dns_lookup_term?, #dns_lookup_term?, #includes_ptr?, #initialize, register, #to_s
Constructor Details
This class inherits a constructor from Coppertone::Mechanism::DomainSpecRequired
Class Method Details
.label ⇒ Object
12 13 14 |
# File 'lib/coppertone/mechanism/exists.rb', line 12 def self.label 'exists' end |
Instance Method Details
#match_target_name(_macro_context, request_context, target_name) ⇒ Object
7 8 9 10 |
# File 'lib/coppertone/mechanism/exists.rb', line 7 def match_target_name(_macro_context, request_context, target_name) records = request_context.dns_client.fetch_a_records(target_name) records.any? end |