Class: StructureElements::Body
- Inherits:
-
ContainerElement
- Object
- ContainerElement
- StructureElements::Body
- Defined in:
- lib/reparcs/elements/structure_elements.rb
Overview
A body element ‘<body></body>’ Use: define a documents body, when you create a new ‘Page’
object a body element is automatically added for you,
you can access it via page_obj.body
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Body
constructor
Create a new body element, takes a optional hash of attributes as parameter.
Constructor Details
#initialize(attrs = {}) ⇒ Body
Create a new body element, takes a optional hash of attributes as parameter
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/reparcs/elements/structure_elements.rb', line 12 def initialize(attrs={}) aattrs = [ "class","id","title", "dir","xml:lang","onclick", "ondblclick","onkeydown", "onkeypress","onkeyup", "onload","onmousedown", "onmousemove","onmouseout", "onmouseover","onmouseup", "onunload" ] childs = [ "a", "address", "blockquote", "del", "div", "fieldset", "form", "hr", "ins", "noscript", "p", "pre", "script", "table", "h1", "h2", "h3", "h4", "h5", "h6", "dl", "ol", "ul" ] super("body", aattrs, childs, attrs) @start_element = "<body" @end_element = "</body>" end |