Class: Cheri::Xml::CommentElem
- Inherits:
-
Object
- Object
- Cheri::Xml::CommentElem
- Includes:
- Builder::CommentBuilder, XmlBuilder, XmlElement
- Defined in:
- lib/cheri/builder/xml/element.rb
Constant Summary collapse
- CO =
:stopdoc:
'<!-- '.freeze
- CC =
' -->'.freeze
- CCLF =
" -->\n".freeze
Constants included from XmlBuilder
Instance Method Summary collapse
- #indent ⇒ Object
-
#initialize(ctx, *r, &k) ⇒ CommentElem
constructor
:startdoc:.
- #margin ⇒ Object
- #mod ⇒ Object
Methods included from XmlBuilder
Constructor Details
#initialize(ctx, *r, &k) ⇒ CommentElem
:startdoc:
184 185 186 187 188 |
# File 'lib/cheri/builder/xml/element.rb', line 184 def initialize(ctx,*r,&k) opt = @opt = ctx[:xml_opts] || {} @fmt = true if opt[:format] super end |
Instance Method Details
#indent ⇒ Object
203 204 205 |
# File 'lib/cheri/builder/xml/element.rb', line 203 def indent @idt || @opt[:indent] || @ctx[:indent] || 0 end |
#margin ⇒ Object
199 200 201 |
# File 'lib/cheri/builder/xml/element.rb', line 199 def margin @mrg || @opt[:margin] || @ctx[:margin] || 0 end |