instance method date=

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

date=( time )

Destructively sets the date of the mail object with the passed Time instance, returns a Time instance set to the date/time of the mail

Example:

now = Time.now
mail.date = now
mail.date #=> Sat Nov 03 18:47:50 +1100 2007
mail.date.class #=> Time

Parameters

time req
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 132
    def date=( time )
      if time
        store 'Date', time2str(time)
      else
        @header.delete 'date'
      end
      time
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb line 132 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::Mail

Type at least 2 characters to search.

↑↓ navigate · open · esc close