Class: TableElements::TableCaption

Inherits:
ContainerElement
  • Object
show all
Defined in:
lib/reparcs/elements/table_elements.rb

Overview

A table Caption element.

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ TableCaption

Creates a new TableCaption element, takes an optional hash of attributes as parameter.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/reparcs/elements/table_elements.rb', line 10

def initialize(attrs={})
  aattrs = [
    "class", "id", "title", "dir", "xml:lang",
    "onclick", "ondblclick", "onkeydown", "onkeypress",
    "onkeyup", "onmousedown", "onmousemove", "onmouseout",
    "onmouseover", "onmouseup", "style", "charset", "hreflang"
  ]
  childs = [
    "a", "abbr", "acronym", "b", "bdo", "big", "br", "button",
    "cite", "code","del", "dfn", "em", "i", "img", "input",
    "ins", "kbd", "label", "map", "object", "q", "samp", "script",
    "select", "small", "span", "strong", "sub", "sup", "textarea",
    "tt", "var"
  ]
  super("caption", aattrs, childs, attrs)
  @start_element = "<caption"
  @end_element = "</caption>"
end