Class: TextElements::Acronym

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

Overview

An acronym element ‘<acronym></acronym>’ Use: Define an acronym.

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Acronym

Create a new Acronym element, takes a optional hash of attributes as parameter.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/reparcs/elements/text_elements.rb', line 35

def initialize(attrs={})
  aattrs = [
    "class", "id", "title", "dir", "xml:lang",
    "onclick", "ondblclick", "onkeydown", "onkeypress",
    "onkeyup", "onmousedown", "onmousemove", "onmouseout",
    "onmouseover", "onmouseup"
  ]
  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("acronym", aattrs, childs, attrs)
  @start_element = "<acronym"
  @end_element = "</acronym>"
end