Class: Dmarcurator::Parser::Record

Inherits:
Base
  • Object
show all
Defined in:
lib/dmarcurator/parser/record.rb

Overview

Parsed XML of a record

Instance Attribute Summary

Attributes inherited from Base

#doc

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Dmarcurator::Parser::Base

Instance Method Details

#auth_dkim_domainObject



34
35
36
# File 'lib/dmarcurator/parser/record.rb', line 34

def auth_dkim_domain
  doc.locate("auth_results/dkim/domain")[0]&.text
end

#auth_dkim_resultObject



38
39
40
# File 'lib/dmarcurator/parser/record.rb', line 38

def auth_dkim_result
  doc.locate("auth_results/dkim/result")[0]&.text
end

#auth_dkim_selectorObject



42
43
44
# File 'lib/dmarcurator/parser/record.rb', line 42

def auth_dkim_selector
  doc.locate("auth_results/dkim/selector")[0]&.text
end

#auth_spf_domainObject



46
47
48
# File 'lib/dmarcurator/parser/record.rb', line 46

def auth_spf_domain
  doc.locate("auth_results/spf/domain")[0].text
end

#auth_spf_resultObject



50
51
52
# File 'lib/dmarcurator/parser/record.rb', line 50

def auth_spf_result
  doc.locate("auth_results/spf/result")[0].text
end

#countObject



10
11
12
# File 'lib/dmarcurator/parser/record.rb', line 10

def count
  doc.locate("row/count")[0].text.to_i
end

#dispositionObject



14
15
16
# File 'lib/dmarcurator/parser/record.rb', line 14

def disposition
  doc.locate("row/policy_evaluated/disposition")[0].text
end

#envelope_toObject



26
27
28
# File 'lib/dmarcurator/parser/record.rb', line 26

def envelope_to
  doc.locate("identifiers/envelope_to")[0]&.text
end

#header_fromObject



30
31
32
# File 'lib/dmarcurator/parser/record.rb', line 30

def header_from
  doc.locate("identifiers/header_from")[0].text
end

#policy_result_dkimObject



18
19
20
# File 'lib/dmarcurator/parser/record.rb', line 18

def policy_result_dkim
  doc.locate("row/policy_evaluated/dkim")[0].text
end

#policy_result_spfObject



22
23
24
# File 'lib/dmarcurator/parser/record.rb', line 22

def policy_result_spf
  doc.locate("row/policy_evaluated/spf")[0].text
end

#source_ipObject



6
7
8
# File 'lib/dmarcurator/parser/record.rb', line 6

def source_ip
  doc.locate("row/source_ip")[0].text
end