Class Index [+]

Quicksearch

Mail::ContentTransferEncodingField

Constants

FIELD_NAME
CAPITALIZED_FIELD

Public Class Methods

new(value = nil, charset = 'utf-8') click to toggle source
    # File lib/mail/fields/content_transfer_encoding_field.rb, line 11
11:     def initialize(value = nil, charset = 'utf-8')
12:       self.charset = charset
13:       value = '7bit' if value.to_s =~ /7-bit/
14:       value = '8bit' if value.to_s =~ /8-bit/
15:       super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, value), charset)
16:       self.parse
17:       self
18:     end

Public Instance Methods

decoded() click to toggle source
    # File lib/mail/fields/content_transfer_encoding_field.rb, line 45
45:     def decoded
46:       encoding
47:     end
element() click to toggle source
    # File lib/mail/fields/content_transfer_encoding_field.rb, line 32
32:     def element
33:       @element ||= Mail::ContentTransferEncodingElement.new(value)
34:     end
encoded() click to toggle source

TODO: Fix this up

    # File lib/mail/fields/content_transfer_encoding_field.rb, line 41
41:     def encoded
42:       "#{CAPITALIZED_FIELD}: #{encoding}\r\n"
43:     end
encoding() click to toggle source
    # File lib/mail/fields/content_transfer_encoding_field.rb, line 36
36:     def encoding
37:       element.encoding
38:     end
parse(val = value) click to toggle source
    # File lib/mail/fields/content_transfer_encoding_field.rb, line 20
20:     def parse(val = value)
21:       unless val.blank?
22:         @element = Mail::ContentTransferEncodingElement.new(val)
23:       end
24:     end
tree() click to toggle source
    # File lib/mail/fields/content_transfer_encoding_field.rb, line 26
26:     def tree
27:       STDERR.puts("tree is deprecated.  Please use encoding to get parse result\n#{caller}")
28:       @element ||= Mail::ContentTransferEncodingElement.new(value)
29:       @tree ||= @element.tree
30:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.