Class: Cheri::Xml::CommentElem
- Inherits:
-
Object
- Object
- Cheri::Xml::CommentElem
show all
- Includes:
- Builder::CommentBuilder, XmlBuilder, XmlElement
- Defined in:
- lib/cheri/builder/xml/element.rb
Constant Summary
collapse
- CO =
'<!-- '.freeze
- CC =
' -->'.freeze
- CCLF =
" -->\n".freeze
Constants included
from XmlBuilder
XmlBuilder::TCE
Instance Method Summary
collapse
Methods included from XmlBuilder
#empty_io, #empty_s, #esc
Constructor Details
#initialize(ctx, *r, &k) ⇒ CommentElem
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
|
#mod ⇒ Object
195
196
197
|
# File 'lib/cheri/builder/xml/element.rb', line 195
def mod
Cheri::Xml
end
|