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

[Source]

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

[Source]

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

[Source]

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

[Source]

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

[Source]

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

[Source]

# File lib/tmail/header.rb, line 723
    def params
      ensure_parsed
      @params
    end

[Source]

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

[Source]

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

[Validate]