Class: Mail::ContentTypeElement
- Inherits:
-
Object
- Object
- Mail::ContentTypeElement
- Defined in:
- lib/mail/elements/content_type_element.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#main_type ⇒ Object
readonly
Returns the value of attribute main_type.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#sub_type ⇒ Object
readonly
Returns the value of attribute sub_type.
Instance Method Summary collapse
-
#initialize(string) ⇒ ContentTypeElement
constructor
A new instance of ContentTypeElement.
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_type ⇒ Object (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 |
#parameters ⇒ Object (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_type ⇒ Object (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 |