Class: OpenXml::Docx::Elements::Container
- Includes:
- PropertyBuilder
- Defined in:
- lib/openxml/docx/elements/container.rb
Direct Known Subclasses
BidiEmbed, BidiOverride, Font, GroupShape, MarkupCompatibilityAlternateContent, MarkupCompatibilityChoice, MarkupCompatibilityFallback, Paragraph, Ruby, Run, SectionProperties, Table, TableCell, TableGrid, TableRow, VmlContainer, WordProcessingDrawingAnchor, WordProcessingDrawingNvGraphicFrameProperties, WordProcessingDrawingPositionH, WordProcessingDrawingPositionOffset, WordProcessingDrawingPositionV, WordProcessingShapesBodyProperties, WordProcessingShapesShape, WordProcessingShapesShapeProperties, OpenXml::DrawingML::Elements::AdjustValuesList, OpenXml::DrawingML::Elements::BlipFill, OpenXml::DrawingML::Elements::ExtensionList, OpenXml::DrawingML::Elements::Graphic, OpenXml::DrawingML::Elements::GraphicData, OpenXml::DrawingML::Elements::NonVisualPictureDrawingProperties, OpenXml::DrawingML::Elements::NonVisualPictureProperties, OpenXml::DrawingML::Elements::Outline, OpenXml::DrawingML::Elements::Picture, OpenXml::DrawingML::Elements::PresetGeometry, OpenXml::DrawingML::Elements::SolidFill, OpenXml::DrawingML::Elements::TransformEffect, OpenXml::DrawingML::Elements::WordprocessingShapeGroup, Vml::Elements::Group, Vml::Elements::Rectangle, Vml::Elements::RoundedRectangle
Constant Summary
Constants included from AttributeBuilder
AttributeBuilder::VALID_THEME_COLORS, AttributeBuilder::VALID_TYPES
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
- #<<(child) ⇒ Object
-
#initialize ⇒ Container
constructor
A new instance of Container.
- #to_xml(xml) ⇒ Object
Methods included from PropertyBuilder
Methods inherited from Element
#name, name, #namespace, tag, #tag
Methods included from AttributeBuilder
#attributes, included, #render?
Constructor Details
#initialize ⇒ Container
Returns a new instance of Container.
9 10 11 |
# File 'lib/openxml/docx/elements/container.rb', line 9 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
7 8 9 |
# File 'lib/openxml/docx/elements/container.rb', line 7 def children @children end |
Instance Method Details
#<<(child) ⇒ Object
13 14 15 |
# File 'lib/openxml/docx/elements/container.rb', line 13 def <<(child) children << child end |
#to_xml(xml) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/openxml/docx/elements/container.rb', line 17 def to_xml(xml) xml[namespace].public_send(tag, xml_attributes) { property_xml(xml) children.each { |child| child.to_xml(xml) } } end |