Class: Coppertone::Modifier::Redirect
- Inherits:
-
Base
show all
- Defined in:
- lib/coppertone/modifier/redirect.rb
Overview
A Redirect modifier found in an SPF record.
Constant Summary
MODIFIER_REGEXP
Instance Attribute Summary
Attributes inherited from Base
#domain_spec
#arguments
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#==, #context_dependent?, #includes_ptr?, #initialize, #target_name_from_domain_spec
build, build_unknown, class_builder, #initialize, #label, matching_term, register, #to_s
Class Method Details
.create(attributes) ⇒ Object
7
8
9
|
# File 'lib/coppertone/modifier/redirect.rb', line 7
def self.create(attributes)
new(attributes)
end
|
.label ⇒ Object
25
26
27
|
# File 'lib/coppertone/modifier/redirect.rb', line 25
def self.label
'redirect'
end
|
Instance Method Details
#evaluate(macro_context, request_context) ⇒ Object
11
12
13
14
|
# File 'lib/coppertone/modifier/redirect.rb', line 11
def evaluate(macro_context, request_context)
request_context.register_dns_lookup_term
target_name_from_domain_spec(macro_context, request_context)
end
|
#included_record(macro_context, request_context) ⇒ Object
16
17
18
|
# File 'lib/coppertone/modifier/redirect.rb', line 16
def included_record(macro_context, request_context)
RedirectRecordFinder.new(self, macro_context, request_context).record
end
|
#target_domain ⇒ Object
20
21
22
23
|
# File 'lib/coppertone/modifier/redirect.rb', line 20
def target_domain
raise NeedsContextError if context_dependent?
arguments
end
|