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) Source: autoload/Doc.ngs:36
Undocumented
init(n:Doc::Node, name:Str, children:Arr=null, **attrs:Hash) Source: autoload/Doc.ngs:50
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) Source: autoload/Doc.ngs:60
Initialize document nodes group

Example

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

Example

Doc::Text(':')
init
This multimethod has additional 96 method(s) not listed above, defined in other namespace(s)
push(c:Doc::Container, p:Doc::Part) Source: autoload/Doc.ngs:70
EXPERIMENTAL! Do not use!
push
This multimethod has additional 7 method(s) not listed above, defined in other namespace(s)
Doc::name(p:Doc::Part) Source: autoload/Doc.ngs:76
Undocumented
Doc::name(n:Doc::Node) Source: autoload/Doc.ngs:77
Undocumented
Doc::children(p:Doc::Part) Source: autoload/Doc.ngs:79
Undocumented
Doc::children(c:Doc::Container) Source: autoload/Doc.ngs:80
Undocumented
Doc::each_child(p:Doc::Part, cb:Fun) Source: autoload/Doc.ngs:82
Undocumented
Doc::map_children(p:Doc::Part, mapper:Fun) Source: autoload/Doc.ngs:83
Undocumented
Doc::Transformer(x:Fun) Source: autoload/Doc.ngs:87
Undocumented
Doc::Transformer(x:Hash) Source: autoload/Doc.ngs:90
Undocumented
Doc::transform(p:Doc::Part, transformer:Any) Source: autoload/Doc.ngs:100
Undocumented
Doc::transform(dps:Arr, transformer:Any) Source: autoload/Doc.ngs:105
Undocumented
Doc::visit(p:Doc::Part, cb:Fun, parents:Arr=[]) Source: autoload/Doc.ngs:111
Undocumented
Doc::Html(n:Doc::Node) Source: autoload/Doc.ngs:118
Undocumented
Doc::Html(t:Doc::Text) Source: autoload/Doc.ngs:142
Undocumented
Doc::Html(g:Doc::Group) Source: autoload/Doc.ngs:144
Undocumented
Doc::HtmlRoot(n:Doc::Node) Source: autoload/Doc.ngs:139
Create HTML document from the give top level document node

Returns

Str
inspect(n:Doc::Node, levels:Any=2) Source: autoload/Doc.ngs:158
Inspect document node

Returns

Lines
inspect
This multimethod has additional 13 method(s) not listed above, defined in other namespace(s)