Class: Coppertone::SenderIdentity

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#domainObject (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

#localpartObject (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

#senderObject (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