Class: Coppertone::Mechanism::Ptr

Inherits:
DomainSpecOptional show all
Defined in:
lib/coppertone/mechanism/ptr.rb

Overview

Implements the ptr mechanism.

Instance Attribute Summary

Attributes inherited from DomainSpecMechanism

#domain_spec

Attributes inherited from Coppertone::Mechanism

#arguments

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DomainSpecOptional

create, #generate_target_name, #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::DomainSpecOptional

Class Method Details

.labelObject



15
16
17
# File 'lib/coppertone/mechanism/ptr.rb', line 15

def self.label
  'ptr'
end

Instance Method Details

#match_target_name(macro_context, request_context, target_name) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/coppertone/mechanism/ptr.rb', line 7

def match_target_name(macro_context, request_context, target_name)
  matching_name =
    Coppertone::Utils::ValidatedDomainFinder
    .new(macro_context, request_context)
    .find(target_name)
  !matching_name.nil?
end