Module: CGI::Html4Fr

Defined in:
lib/cgi/html.rb

Overview

Mixin module for generating HTML version 4 with framesets.

Instance Method Summary collapse

Instance Method Details

#doctypeObject

The DOCTYPE declaration for this version of HTML



994
995
996
# File 'lib/cgi/html.rb', line 994

def doctype
  %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">|
end

#element_initObject

Initialise the HTML generation methods for this version.



999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
# File 'lib/cgi/html.rb', line 999

def element_init
  return if defined?(frameset)
  methods = ""
  # - -
  for element in %w[ FRAMESET ]
    methods << "      def \#{element.downcase}(attributes = {})\n    BEGIN\n      end\n    END\n  end\n\n  # - O EMPTY\n  for element in %w[ FRAME ]\n    methods << <<-BEGIN + nOE_element_def(element) + <<-END\n      def \#{element.downcase}(attributes = {})\n    BEGIN\n      end\n    END\n  end\n  eval(methods)\nend\n" + nn_element_def(element) + ""