class Coppertone::RedirectRecordFinder
A helper class for finding SPF records for a redirect modifier.
Attributes
macro_context[R]
redirect[R]
request_context[R]
Public Class Methods
new(redirect, macro_context, request_context)
click to toggle source
# File lib/coppertone/redirect_record_finder.rb, line 6 def initialize(redirect, macro_context, request_context) @redirect = redirect @macro_context = macro_context @request_context = request_context end
Public Instance Methods
record()
click to toggle source
# File lib/coppertone/redirect_record_finder.rb, line 16 def record return unless target @record ||= RecordFinder.new(request_context.dns_client, target).record end
target()
click to toggle source
# File lib/coppertone/redirect_record_finder.rb, line 12 def target @target ||= redirect.evaluate(macro_context, request_context) end