Sha256: 961cc4876125235f9ae0f155e61c56bde2539063227e81cd01b3e366c7c120c0
Contents?: true
Size: 1.11 KB
Versions: 28
Compression:
Stored size: 1.11 KB
Contents
require 'fortitude/doctypes/base' require 'fortitude/doctypes/html4' require 'fortitude/doctypes/html4_frameset' require 'fortitude/doctypes/html4_strict' require 'fortitude/doctypes/html4_transitional' require 'fortitude/doctypes/html5' require 'fortitude/doctypes/xhtml10' require 'fortitude/doctypes/xhtml10_frameset' require 'fortitude/doctypes/xhtml10_strict' require 'fortitude/doctypes/xhtml10_transitional' require 'fortitude/doctypes/xhtml11' module Fortitude module Doctypes KNOWN_DOCTYPES = begin out = { } [ Html5, Html4Strict, Html4Transitional, Html4Frameset, Xhtml10Strict, Xhtml10Transitional, Xhtml10Frameset, Xhtml11 ].each do |doctype_class| doctype = doctype_class.new out[doctype.name] = doctype end out end class << self def standard_doctype(type) out = KNOWN_DOCTYPES[type] unless out raise ArgumentError, "Unknown standard doctype #{type.inspect}; I know about: #{KNOWN_DOCTYPES.keys.inspect}" end out end end end end
Version data entries
28 entries across 28 versions & 1 rubygems