Class: Cheri::Xml::CommentElem

Inherits:
Object
  • Object
show all
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

XmlBuilder::TCE

Instance Method Summary collapse

Methods included from XmlBuilder

#empty_io, #empty_s, #esc

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

#indentObject



203
204
205
# File 'lib/cheri/builder/xml/element.rb', line 203

def indent
  @idt || @opt[:indent] || @ctx[:indent] || 0
end

#marginObject



199
200
201
# File 'lib/cheri/builder/xml/element.rb', line 199

def margin
  @mrg || @opt[:margin] || @ctx[:margin] || 0
end

#modObject



195
196
197
# File 'lib/cheri/builder/xml/element.rb', line 195

def mod
  Cheri::Xml  
end