Included Modules

Class Index [+]

Quicksearch

Mail::DateField

Constants

FIELD_NAME
CAPITALIZED_FIELD

Public Class Methods

new(value = nil, charset = 'utf-8') click to toggle source
    # File lib/mail/fields/date_field.rb, line 34
34:     def initialize(value = nil, charset = 'utf-8')
35:       self.charset = charset
36:       if value.blank?
37:         value = Time.now.strftime('%a, %d %b %Y %H:%M:%S %z')
38:       else
39:         value = strip_field(FIELD_NAME, value)
40:         value.to_s.gsub!(/\(.*?\)/, '')
41:         value = ::DateTime.parse(value.to_s.squeeze(" ")).strftime('%a, %d %b %Y %H:%M:%S %z')
42:       end
43:       super(CAPITALIZED_FIELD, value, charset)
44:     end

Public Instance Methods

decoded() click to toggle source
    # File lib/mail/fields/date_field.rb, line 50
50:     def decoded
51:       do_decode
52:     end
encoded() click to toggle source
    # File lib/mail/fields/date_field.rb, line 46
46:     def encoded
47:       do_encode(CAPITALIZED_FIELD)
48:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.