Class: Cheri::Html::CommentElem

Inherits:
Object
  • Object
show all
Includes:
Builder::CommentBuilder, HtmlBuilder, HtmlElement
Defined in:
lib/cheri/builder/html/element.rb

Instance Method Summary collapse

Methods included from HtmlBuilder

#esc

Constructor Details

#initialize(ctx, *r, &k) ⇒ CommentElem

Returns a new instance of CommentElem.



171
172
173
174
175
# File 'lib/cheri/builder/html/element.rb', line 171

def initialize(ctx,*r,&k)
  opt = @opt = ctx[:html_opts] || {}
  @fmt = true if opt[:format]
  super
end

Instance Method Details

#indentObject



190
191
192
# File 'lib/cheri/builder/html/element.rb', line 190

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

#marginObject



186
187
188
# File 'lib/cheri/builder/html/element.rb', line 186

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

#modObject



182
183
184
# File 'lib/cheri/builder/html/element.rb', line 182

def mod
  Cheri::Html  
end