Class: PresentationElements::Teletype

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

Overview

A Teletype element

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Teletype

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



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/reparcs/elements/presentation_elements.rb', line 155

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