Class: ListElements::DefinitionList

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

Overview

A definition list element ‘<dl></dl>’

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ DefinitionList

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



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/reparcs/elements/list_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"
  ]
  childs = ["dd", "dt"]
  super("dl", aattrs, childs, attrs)
  @start_element = "<dl"
  @end_element = "</dl>"
end