Class: TextElements::Emphasized

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

Overview

A emphasized element ” Use: Emphasizes text.

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Emphasized

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



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/reparcs/elements/text_elements.rb', line 192

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