Class: Cheri::Xml::Elem
Overview
Constant Summary
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) ⇒ 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
|
#mod ⇒ Object
69
70
71
|
# File 'lib/cheri/builder/xml/element.rb', line 69
def mod
Cheri::Xml
end
|