class Mail::Envelope - mail-2.5.4 Documentation

# class Mail::Envelope

### Public Class Methods

new(*args) click to toggle source
Calls superclass method

    # File lib/mail/envelope.rb, line 12
    def initialize(*args)
      super(FIELD_NAME, strip_field(FIELD_NAME, args.last))
    end

### Public Instance Methods

date() click to toggle source

    # File lib/mail/envelope.rb, line 25
    def date
      ::DateTime.parse("#{element.date_time}")
    end

element() click to toggle source

    # File lib/mail/envelope.rb, line 21
    def element
      @element ||= Mail::EnvelopeFromElement.new(value)
    end

from() click to toggle source

    # File lib/mail/envelope.rb, line 29
    def from
      element.address
    end

tree() click to toggle source

    # File lib/mail/envelope.rb, line 16
    def tree
      @element ||= Mail::EnvelopeFromElement.new(value)
      @tree ||= @element.tree
    end