Doc namespace

EXPERIMENTAL. Do not use! Defines types and methods to work with document nodes. Can be used to relatively conveniently generate HTML.

Types

6 types, which are descendants of types listed below, are not shown for brevity
Doc::Part
Document part. May represent one element (which might have children) or group of elements.
Direct subtypes: 2

Methods and Multimethods

Doc::init_children(c:Doc::Container)
Undocumented
init(n:Doc::Node, name:Str, children:Arr=null, **attrs:Hash)
Initialize document node

Example

Doc::Node('span', class='inline-param') with [
	Doc::Text(param.name)
	Doc::Text(':')
	Doc::Text(param.type.name)
	...
]
init(g:Doc::Group, children:Arr=null, **attrs:Hash)
Initialize document nodes group

Example

Doc::Group() with [
	Doc::Text('something')
	...
]
init(t:Doc::Textual, txt:Str)
Initialize text fragment of a document

Example

Doc::Text(':')
init
This multimethod has additional 142 method(s) not listed above, defined in other namespace(s)
push(c:Doc::Container, p:Doc::Part)
EXPERIMENTAL! Do not use!
push
This multimethod has additional 9 method(s) not listed above, defined in other namespace(s)
Doc::name(p:Doc::Part)
Undocumented
Doc::name(n:Doc::Node)
Undocumented
Doc::children(p:Doc::Part)
Undocumented
Doc::children(c:Doc::Container)
Undocumented
Doc::each_child(p:Doc::Part, cb:Fun)
Undocumented
Doc::map_children(p:Doc::Part, mapper:Fun)
Undocumented
Doc::Transformer(x:Fun)
Undocumented
Doc::Transformer(x:Hash)
Undocumented
Doc::transform(p:Doc::Part, transformer:Any)
Undocumented
Doc::transform(dps:Arr, transformer:Any)
Undocumented
Doc::visit(p:Doc::Part, cb:Fun, parents:Arr=[])
Undocumented
Doc::Html(n:Doc::Node)
Undocumented
Doc::Html(t:Doc::Text)
Undocumented
Doc::Html(g:Doc::Group)
Undocumented
Doc::HtmlRoot(n:Doc::Node)
Create HTML document from the give top level document node

Returns

Str