Class: TextElements::Sample
- Inherits:
-
ContainerElement
- Object
- ContainerElement
- TextElements::Sample
- Defined in:
- lib/reparcs/elements/text_elements.rb
Overview
A sample element Use: Define a sample code text.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Sample
constructor
Create a new Sample element, takes a optional hash of attributes as parameter.
Constructor Details
#initialize(attrs = {}) ⇒ Sample
Create a new Sample element, takes a optional hash of attributes as parameter.
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/reparcs/elements/text_elements.rb', line 346 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("samp", aattrs, childs, attrs) @start_element = "<samp" @end_element = "</samp>" end |