Class: Table

Inherits:
Array
  • Object
show all
Includes:
XX::HTML4::Strict, XX::XHTML::Strict, XX::XML
Defined in:
lib/xx.rb,
lib/xx-2.1.0.rb

Constant Summary

Constants included from XX::Markup

XX::Markup::XX_MARKUP_RECURSIVE_INCLUSION_PROC

Instance Method Summary collapse

Methods included from XX::XML

#xml_

Methods included from XX::Markup

included

Methods included from XX::Markup::ClassMethods

#xx_ancestors, #xx_config, #xx_config_for, #xx_configure, #xx_define_tag_method, #xx_define_tmp_method, #xx_remove_tag_method, #xx_tag_method_name

Methods included from XX::Markup::InstanceMethods

#_, #method_missing, #xx_ancestors, #xx_any_, #xx_cdata_, #xx_class, #xx_config, #xx_config_for, #xx_configure, #xx_define_tag_method, #xx_define_tmp_method, #xx_doc, #xx_markup_, #xx_parse_attributes, #xx_parse_yaml_attributes, #xx_remove_tag_method, #xx_tag_method_name, #xx_text_, #xx_which, #xx_with_doc_in_effect

Methods included from XX::HTML4::Strict

#html4_

Methods included from XX::HTML4

#html4_

Methods included from XX::XHTML::Strict

#xhtml_

Methods included from XX::XHTML

#xhtml_

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class XX::Markup::InstanceMethods

Instance Method Details

#docObject



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
# File 'lib/xx.rb', line 881

def doc 
  html_{
    head_{ title_{ "xhtml/html4/xml demo" } }

    div_{
      h_{ "< malformed html & un-escaped symbols" }
    }

    t_{ "escaped & text > <" }

    x_{ "<any_valid> xml </any_valid>" }

    div_(:style => :sweet){ 
      em_ "this is a table"

      table_(:width => 42, :height => 42){
        each{|row| tr_{ row.each{|cell| td_ cell } } }
      }
    }

    script_(:type => :dangerous){ cdata_{ "javascript" } }
  }
end

#to_html4Object



907
908
909
# File 'lib/xx.rb', line 907

def to_html4
  html4_{ doc }
end

#to_xhtmlObject



904
905
906
# File 'lib/xx.rb', line 904

def to_xhtml
  xhtml_{ doc }
end

#to_xmlObject



910
911
912
# File 'lib/xx.rb', line 910

def to_xml
  xml_{ doc }
end