Exception: SPF::Result::Fail

Inherits:
SPF::Result show all
Defined in:
lib/spf/result.rb

Constant Summary

Constants inherited from SPF::Result

ATEXT_PATTERN, DOT_ATOM_PATTERN, RECEIVED_SPF_HEADER_IDENTITY_KEY_NAMES_BY_SCOPE, RECEIVED_SPF_HEADER_NAME, RECEIVED_SPF_HEADER_SCOPE_NAMES_BY_SCOPE, RESULT_CLASSES

Instance Attribute Summary

Attributes inherited from SPF::Result

#request, #result_text, #server

Instance Method Summary collapse

Methods inherited from SPF::Result

#initialize, #is_code, #isa_by_name, #klass, #local_explanation, #name, #received_spf_header, #to_s

Constructor Details

This class inherits a constructor from SPF::Result

Instance Method Details

#authority_explanationObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/spf/result.rb', line 20

def authority_explanation
  if self.instance_variable_defined?(:@authority_explanation)
    return @authority_explanation
  end

  @authority_explanation = nil

  server  = @server
  request = @request

  authority_explanation_macrostring = request.state('authority_explanation')

  # If an explicit explanation was specified by the authority domain...
  if authority_explanation_macrostring
    begin
      # ... then try to expand it:
      @authority_explanation = authority_explanation_macrostring.expand
    rescue SPF::InvalidMacroString
      # Igonre expansion errors and leave authority explanation undefined.
    end
  end

  # If no authority explanation could be determined so far...
  unless @authority_explanation
    @authority_explanation = server.default_authority_explanation.new({:request => request}).expand
  end
  return @authority_explanation
end

#codeObject



16
17
18
# File 'lib/spf/result.rb', line 16

def code
  :fail
end