Class: Mail::Envelope

Inherits:
NamedStructuredField show all
Defined in:
lib/mail/envelope.rb

Constant Summary collapse

NAME =
'Envelope-From'

Instance Attribute Summary

Attributes inherited from CommonField

#charset, #errors, #name, #value

Instance Method Summary collapse

Methods inherited from NamedStructuredField

#initialize

Methods inherited from CommonField

#decoded, #default, #encoded, #initialize, parse, #parse, #responsible_for?, #singular?, singular?, #to_s

Constructor Details

This class inherits a constructor from Mail::NamedStructuredField

Instance Method Details

#dateObject



24
25
26
# File 'lib/mail/envelope.rb', line 24

def date
  element.date_time
end

#elementObject



16
17
18
# File 'lib/mail/envelope.rb', line 16

def element
  @element ||= Mail::EnvelopeFromElement.new(value)
end

#fromObject



20
21
22
# File 'lib/mail/envelope.rb', line 20

def from
  element.address
end