Class | TMail::ContentTypeHeader
In: | lib/tmail/header.rb
Parent: | StructuredHeader

### Methods

[] []= content_type main_type main_type= params sub_type sub_type=

### Constants

PARSE_TYPE | = | :CTYPE

### Public Instance methods

[]( key )

[Source]

    # File lib/tmail/header.rb, line 788
        def []( key )
          ensure_parsed
          @params and unquote(@params[key])
        end

[]=( key, val )

[Source]

    # File lib/tmail/header.rb, line 793
        def []=( key, val )
          ensure_parsed
          (@params ||= {})[key] = val
        end

content_type()

[Source]

    # File lib/tmail/header.rb, line 773
        def content_type
          ensure_parsed
          @sub ? sprintf('%s/%s', @main, @sub) : @main
        end

main_type()

[Source]

    # File lib/tmail/header.rb, line 753
        def main_type
          ensure_parsed
          @main
        end

main_type=( arg )

[Source]

    # File lib/tmail/header.rb, line 758
        def main_type=( arg )
          ensure_parsed
          @main = arg.downcase
        end

params()

[Source]

    # File lib/tmail/header.rb, line 778
        def params
          ensure_parsed
          unless @params.blank?
            @params.each do |k, v|
              @params[k] = unquote(v)
            end
          end
          @params
        end

sub_type()

[Source]

    # File lib/tmail/header.rb, line 763
        def sub_type
          ensure_parsed
          @sub
        end

sub_type=( arg )

[Source]

    # File lib/tmail/header.rb, line 768
        def sub_type=( arg )
          ensure_parsed
          @sub = arg.downcase
        end

[Validate]