Class: TextElements::Variable

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

Overview

A variable element Use: Defines a variable.

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Variable

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



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/reparcs/elements/text_elements.rb', line 418

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("var", aattrs, childs, attrs)
  @start_element = "<var"
  @end_element = "</var>"
end