Class: Cheri::Xml::Elem
- Inherits:
-
Object
- Object
- Cheri::Xml::Elem
- Includes:
- Builder::MarkupBuilder, XmlBuilder, XmlElement
- Defined in:
- lib/cheri/builder/xml/element.rb
Overview
XmlBuilder
Direct Known Subclasses
Constant Summary
Constants included from XmlBuilder
Instance Method Summary collapse
- #indent ⇒ Object
-
#initialize(ctx, *r, &k) ⇒ Elem
constructor
A new instance of Elem.
- #margin ⇒ Object
- #mod ⇒ Object
Methods included from XmlBuilder
Constructor Details
#initialize(ctx, *r, &k) ⇒ Elem
Returns a new instance of Elem.
62 63 64 65 66 67 |
# File 'lib/cheri/builder/xml/element.rb', line 62 def initialize(ctx,*r,&k) opt = @opt = ctx[:xml_opts] || {} @fmt = true if opt[:format] @amap = opt[:attr] if opt[:attr] super end |
Instance Method Details
#indent ⇒ Object
77 78 79 |
# File 'lib/cheri/builder/xml/element.rb', line 77 def indent @idt || @opt[:indent] || @ctx[:indent] || 0 end |
#margin ⇒ Object
73 74 75 |
# File 'lib/cheri/builder/xml/element.rb', line 73 def margin @mrg || @opt[:margin] || @ctx[:margin] || 0 end |