Module: CGI::Html4Fr

Defined in:
lib/cgialt/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



1001
1002
1003
# File 'lib/cgialt/html.rb', line 1001

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.



1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'lib/cgialt/html.rb', line 1006

def element_init
  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) + ""