class Coppertone::Mechanism::Include
Implements the include mechanism.
Public Class Methods
label()
click to toggle source
# File lib/coppertone/mechanism/include.rb, line 24 def self.label 'include' end
Public Instance Methods
context_for_include(macro_context, target_name)
click to toggle source
# File lib/coppertone/mechanism/include.rb, line 16 def context_for_include(macro_context, target_name) macro_context.with_domain(target_name) end
included_record(request_context, target_name)
click to toggle source
# File lib/coppertone/mechanism/include.rb, line 20 def included_record(request_context, target_name) RecordFinder.new(request_context.dns_client, target_name).record end
match_target_name(macro_context, request_context, target_name)
click to toggle source
# File lib/coppertone/mechanism/include.rb, line 9 def match_target_name(macro_context, request_context, target_name) record = included_record(request_context, target_name) IncludeMatcher.new(record) .match?(context_for_include(macro_context, target_name), request_context) end