Class: Cheri::Html::Elem
- Inherits:
-
Object
- Object
- Cheri::Html::Elem
- Includes:
- Builder::MarkupBuilder, HtmlBuilder, HtmlElement
- Defined in:
- lib/cheri/builder/html/element.rb
Overview
HtmlBuilder
Instance Method Summary collapse
- #indent ⇒ Object
-
#initialize(ctx, *r, &k) ⇒ Elem
constructor
A new instance of Elem.
- #margin ⇒ Object
- #mod ⇒ Object
Methods included from HtmlBuilder
Constructor Details
#initialize(ctx, *r, &k) ⇒ Elem
Returns a new instance of Elem.
53 54 55 56 57 58 |
# File 'lib/cheri/builder/html/element.rb', line 53 def initialize(ctx,*r,&k) opt = @opt = ctx[:html_opts] || {} @fmt = true if opt[:format] @amap = opt[:attr] if opt[:attr] super end |
Instance Method Details
#indent ⇒ Object
68 69 70 |
# File 'lib/cheri/builder/html/element.rb', line 68 def indent @idt || @opt[:indent] || @ctx[:indent] || 0 end |
#margin ⇒ Object
64 65 66 |
# File 'lib/cheri/builder/html/element.rb', line 64 def margin @mrg || @opt[:margin] || @ctx[:margin] || 0 end |