class HTTP::Accept::ContentType

A content type is different from a media range, in that a content type should not have any wild cards.

Public Class Methods

new(mime_type, parameters = {}) click to toggle source
Calls superclass method
# File lib/http/accept/content_type.rb, line 28
def initialize(mime_type, parameters = {})
        # We do some basic validation here:
        raise ArgumentError.new("#{self.class} can not have wildcards: #{mime_type}") if mime_type.include? '*'
        
        super
end