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(type, subtype, parameters = {}) click to toggle source
Calls superclass method
# File lib/http/accept/content_type.rb, line 30
def initialize(type, subtype, parameters = {})
        # We do some basic validation here:
        raise ArgumentError.new("#{self.class} can not have wildcards: #{type}", "#{subtype}") if type.include?('*') || subtype.include?('*')
        
        super
end