Class: Coppertone::SenderIdentity
- Inherits:
-
Object
- Object
- Coppertone::SenderIdentity
- Defined in:
- lib/coppertone/sender_identity.rb
Overview
A consolidated sender identity, suitable for use with an SPF request. Parses the identity and ensures validity. Also has accessor methods for the macro letters.
Constant Summary collapse
- DEFAULT_LOCALPART =
'postmaster'.freeze
- EMAIL_ADDRESS_SPLIT_REGEXP =
/^(.*)@(.*?)$/
Instance Attribute Summary collapse
-
#domain ⇒ Object
(also: #o)
readonly
Returns the value of attribute domain.
-
#localpart ⇒ Object
(also: #l)
readonly
Returns the value of attribute localpart.
-
#sender ⇒ Object
(also: #s)
readonly
Returns the value of attribute sender.
Instance Method Summary collapse
-
#initialize(sender) ⇒ SenderIdentity
constructor
A new instance of SenderIdentity.
Constructor Details
#initialize(sender) ⇒ SenderIdentity
Returns a new instance of SenderIdentity.
10 11 12 13 |
# File 'lib/coppertone/sender_identity.rb', line 10 def initialize(sender) @sender = sender initialize_localpart_and_domain end |
Instance Attribute Details
#domain ⇒ Object (readonly) Also known as: o
Returns the value of attribute domain.
9 10 11 |
# File 'lib/coppertone/sender_identity.rb', line 9 def domain @domain end |
#localpart ⇒ Object (readonly) Also known as: l
Returns the value of attribute localpart.
9 10 11 |
# File 'lib/coppertone/sender_identity.rb', line 9 def localpart @localpart end |
#sender ⇒ Object (readonly) Also known as: s
Returns the value of attribute sender.
9 10 11 |
# File 'lib/coppertone/sender_identity.rb', line 9 def sender @sender end |