Class: DMARC::Record
- Inherits:
-
Struct
- Object
- Struct
- DMARC::Record
- Defined in:
- lib/dmarc/record.rb
Constant Summary collapse
- DEFAULTS =
{ adkim: 'r', aspf: 'r', fo: '0', pct: 100, rf: 'afrf', ri: 86400, }
Instance Attribute Summary collapse
-
#adkim ⇒ Object
Returns the value of attribute adkim.
-
#aspf ⇒ Object
Returns the value of attribute aspf.
-
#fo ⇒ Object
Returns the value of attribute fo.
-
#p ⇒ Object
Returns the value of attribute p.
-
#pct ⇒ Object
Returns the value of attribute pct.
-
#rf ⇒ Object
Returns the value of attribute rf.
-
#ri ⇒ Object
Returns the value of attribute ri.
-
#rua ⇒ Object
Returns the value of attribute rua.
-
#ruf ⇒ Object
Returns the value of attribute ruf.
-
#sp ⇒ Object
Returns the value of attribute sp.
-
#v ⇒ Object
Returns the value of attribute v.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Record
constructor
A new instance of Record.
Constructor Details
Instance Attribute Details
#adkim ⇒ Object
Returns the value of attribute adkim
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def adkim @adkim end |
#aspf ⇒ Object
Returns the value of attribute aspf
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def aspf @aspf end |
#fo ⇒ Object
Returns the value of attribute fo
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def fo @fo end |
#p ⇒ Object
Returns the value of attribute p
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def p @p end |
#pct ⇒ Object
Returns the value of attribute pct
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def pct @pct end |
#rf ⇒ Object
Returns the value of attribute rf
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def rf @rf end |
#ri ⇒ Object
Returns the value of attribute ri
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def ri @ri end |
#rua ⇒ Object
Returns the value of attribute rua
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def rua @rua end |
#ruf ⇒ Object
Returns the value of attribute ruf
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def ruf @ruf end |
#sp ⇒ Object
Returns the value of attribute sp
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def sp @sp end |
#v ⇒ Object
Returns the value of attribute v
5 6 7 |
# File 'lib/dmarc/record.rb', line 5 def v @v end |
Class Method Details
.from_txt(rec) ⇒ Object
7 8 9 10 11 |
# File 'lib/dmarc/record.rb', line 7 def self.from_txt(rec) new(Parser.new.parse(rec)) rescue Parslet::ParseFailed raise InvalidRecord end |