Class: Mail::ContentTypeElement

Inherits:
Object
  • Object
show all
Defined in:
lib/mail/elements/content_type_element.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ ContentTypeElement

Returns a new instance of ContentTypeElement



9
10
11
12
13
14
# File 'lib/mail/elements/content_type_element.rb', line 9

def initialize(string)
  content_type = Mail::Parsers::ContentTypeParser.parse(cleaned(string))
  @main_type = content_type.main_type
  @sub_type = content_type.sub_type
  @parameters = content_type.parameters
end

Instance Attribute Details

#main_typeObject (readonly)

Returns the value of attribute main_type



7
8
9
# File 'lib/mail/elements/content_type_element.rb', line 7

def main_type
  @main_type
end

#parametersObject (readonly)

Returns the value of attribute parameters



7
8
9
# File 'lib/mail/elements/content_type_element.rb', line 7

def parameters
  @parameters
end

#sub_typeObject (readonly)

Returns the value of attribute sub_type



7
8
9
# File 'lib/mail/elements/content_type_element.rb', line 7

def sub_type
  @sub_type
end