Class: Mail::ReturnPathField

Inherits:
StructuredField show all
Includes:
CommonAddress
Defined in:
lib/mail/fields/return_path_field.rb

Constant Summary collapse

FIELD_NAME =
'return-path'
CAPITALIZED_FIELD =
'Return-Path'

Instance Method Summary collapse

Methods included from CommonAddress

included

Methods included from Utilities

included

Methods included from CommonField

included

Constructor Details

#initialize(*args) ⇒ ReturnPathField

Returns a new instance of ReturnPathField.



38
39
40
41
42
43
# File 'lib/mail/fields/return_path_field.rb', line 38

def initialize(*args)
  super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
  self.parse
  self

end

Instance Method Details

#addressObject



53
54
55
# File 'lib/mail/fields/return_path_field.rb', line 53

def address
  addresses.first
end

#decodedObject



49
50
51
# File 'lib/mail/fields/return_path_field.rb', line 49

def decoded
  do_decode
end

#defaultObject



57
58
59
# File 'lib/mail/fields/return_path_field.rb', line 57

def default
  address
end

#encodedObject



45
46
47
# File 'lib/mail/fields/return_path_field.rb', line 45

def encoded
  "#{CAPITALIZED_FIELD}: <#{address}>\r\n"
end