# File lib/mime/type.rb, line 291
291:     def initialize(content_type) #:yields self:
292:       matchdata = CONTENT_TYPE_RE.match(content_type)
293: 
294:       if matchdata.nil?
295:         raise InvalidContentType, "Invalid Content-Type provided ('#{content_type}')"
296:       end
297: 
298:       @content_type = content_type
299:       @raw_media_type = matchdata.captures[0]
300:       @raw_sub_type = matchdata.captures[1]
301: 
302:       @simplified = MIME::Type.simplified(@content_type)
303:       matchdata = CONTENT_TYPE_RE.match(@simplified)
304:       @media_type = matchdata.captures[0]
305:       @sub_type = matchdata.captures[1]
306: 
307:       self.extensions = nil
308:       self.encoding = :default
309:       self.system = nil
310: 
311:       yield self if block_given?
312:     end