Class: MailAuth::Spf::Context

Inherits:
Data
  • Object
show all
Defined in:
lib/mailauth/spf.rb

Overview

What a macro can expand to. domain is whose record we're reading now, which an include or redirect moves away from the sender's.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain

Returns:

  • (Object)

    the current value of domain



50
51
52
# File 'lib/mailauth/spf.rb', line 50

def domain
  @domain
end

#heloObject (readonly)

Returns the value of attribute helo

Returns:

  • (Object)

    the current value of helo



50
51
52
# File 'lib/mailauth/spf.rb', line 50

def helo
  @helo
end

#ipObject (readonly)

Returns the value of attribute ip

Returns:

  • (Object)

    the current value of ip



50
51
52
# File 'lib/mailauth/spf.rb', line 50

def ip
  @ip
end

#senderObject (readonly)

Returns the value of attribute sender

Returns:

  • (Object)

    the current value of sender



50
51
52
# File 'lib/mailauth/spf.rb', line 50

def sender
  @sender
end

Instance Method Details

#for_domain(domain) ⇒ Object



59
60
61
# File 'lib/mailauth/spf.rb', line 59

def for_domain(domain)
  with(domain: domain)
end

#localObject



51
52
53
# File 'lib/mailauth/spf.rb', line 51

def local
  sender.split("@", 2).first
end

#sender_domainObject



55
56
57
# File 'lib/mailauth/spf.rb', line 55

def sender_domain
  sender.split("@", 2).last
end