Class: TextElements::Division

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

Overview

A Division element ‘<div></div>’ Use: Define a divison(usually refered to as a layer or div).

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Division

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



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/reparcs/elements/text_elements.rb', line 167

def initialize(attrs={})
  aattrs = [
    "class", "id", "title", "dir", "xml:lang",
    "onclick", "ondblclick", "onkeydown", "onkeypress",
    "onkeyup", "onmousedown", "onmousemove", "onmouseout",
    "onmouseover", "onmouseup" 
  ]
  childs = [
    "a", "abbr", "acronym", "address", "b", "bdo", "big", "blockquote",
    "br", "button", "cite", "code", "del" ,"dfn", "div", "dl", "em",
    "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i",
    "img", "input", "ins", "kbd", "label", "map", "noscript", "object",
    "ol", "p", "pre", "q", "samp", "script", "select", "small", "span",
    "strong", "sub", "sup", "table", "textarea", "tt", "ul", "var"
  ]
  super("div", aattrs, childs, attrs)
  @start_element = "<div"
  @end_element = "</div>"
end