Class: Docxtor2::Package::Document::Element
- Inherits:
-
ElementList
- Object
- ElementList
- Docxtor2::Package::Document::Element
- Includes:
- BlockEvaluator, ObjectUtils
- Defined in:
- lib/docxtor2/package/document/element.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Element
constructor
A new instance of Element.
- #render(xml) ⇒ Object
Methods included from ObjectUtils
Methods included from BlockEvaluator
Methods inherited from ElementList
Constructor Details
#initialize(*args, &block) ⇒ Element
Returns a new instance of Element.
6 7 8 9 10 |
# File 'lib/docxtor2/package/document/element.rb', line 6 def initialize(*args, &block) @params = create_attributes(args) @block = block super() end |
Instance Method Details
#render(xml) ⇒ Object
12 13 14 15 |
# File 'lib/docxtor2/package/document/element.rb', line 12 def render(xml) @xml = xml evaluate &@block end |