class Mail::ReturnPathField - mail-2.5.4 Documentation

# class Mail::ReturnPathField

### Constants

CAPITALIZED_FIELD
FIELD_NAME

### Public Class Methods

new(value = nil, charset = 'utf-8') click to toggle source
Calls superclass method

    # File lib/mail/fields/return_path_field.rb, line 39
    def initialize(value = nil, charset = 'utf-8')
      value = nil if value == '<>'
      self.charset = charset
      super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, value), charset)
      self.parse
      self
    end

### Public Instance Methods

address() click to toggle source

    # File lib/mail/fields/return_path_field.rb, line 55
    def address
      addresses.first
    end

decoded() click to toggle source

    # File lib/mail/fields/return_path_field.rb, line 51
    def decoded
      do_decode
    end

default() click to toggle source

    # File lib/mail/fields/return_path_field.rb, line 59
    def default
      address
    end

encoded() click to toggle source

    # File lib/mail/fields/return_path_field.rb, line 47
    def encoded
      "#{CAPITALIZED_FIELD}: <#{address}>\r\n"
    end