Class: TextElements::Quotation

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

Overview

A quotaton element Use: Define a quotation.

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Quotation

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



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/reparcs/elements/text_elements.rb', line 322

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