Class: OpenXml::Docx::Elements::Element
- Inherits:
-
Object
- Object
- OpenXml::Docx::Elements::Element
show all
- Includes:
- AttributeBuilder
- Defined in:
- lib/openxml/docx/elements/element.rb
Direct Known Subclasses
AbsolutePositionTab, Break, CarriageReturn, Container, ContentPart, Control, Dirty, Drawing, EmbedBold, EmbedBoldItalic, EmbedItalic, EmbedRegular, Family, GridColumn, LastRenderedPageBreak, LongDay, LongMonth, LongYear, NonbreakingHyphen, OptionalHyphen, PageNumber, ShortDay, ShortMonth, ShortYear, Symbol, Tab, Text, WordProcessingDrawingEffectExtent, WordProcessingDrawingExtent, WordProcessingDrawingObjectNvProperties, WordProcessingDrawingSimplePosition, WordProcessingDrawingWrapNone, OpenXml::DrawingML::Elements::Extension, OpenXml::DrawingML::Elements::Extents, OpenXml::DrawingML::Elements::GraphicFrameLocks, OpenXml::DrawingML::Elements::HeadEnd, OpenXml::DrawingML::Elements::NoFill, OpenXml::DrawingML::Elements::NonVisualDrawingProperties, OpenXml::DrawingML::Elements::Offset, OpenXml::DrawingML::Elements::Round, OpenXml::DrawingML::Elements::SRGBColor, OpenXml::DrawingML::Elements::ShapeGuide, OpenXml::DrawingML::Elements::TailEnd
Constant Summary
AttributeBuilder::VALID_THEME_COLORS, AttributeBuilder::VALID_TYPES
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#attributes, included, #render?
Class Attribute Details
.namespace(*args) ⇒ Object
Returns the value of attribute namespace.
9
10
11
|
# File 'lib/openxml/docx/elements/element.rb', line 9
def namespace
@namespace
end
|
.property_name ⇒ Object
Returns the value of attribute property_name.
8
9
10
|
# File 'lib/openxml/docx/elements/element.rb', line 8
def property_name
@property_name
end
|
Class Method Details
.name(*args) ⇒ Object
16
17
18
19
|
# File 'lib/openxml/docx/elements/element.rb', line 16
def name(*args)
@property_name = args.first if args.any?
@name
end
|
.tag(*args) ⇒ Object
11
12
13
14
|
# File 'lib/openxml/docx/elements/element.rb', line 11
def tag(*args)
@tag = args.first if args.any?
@tag
end
|
Instance Method Details
#name ⇒ Object
32
33
34
|
# File 'lib/openxml/docx/elements/element.rb', line 32
def name
self.class.property_name || default_name
end
|
#namespace ⇒ Object
36
37
38
|
# File 'lib/openxml/docx/elements/element.rb', line 36
def namespace
self.class.namespace || default_namespace
end
|
#tag ⇒ Object
28
29
30
|
# File 'lib/openxml/docx/elements/element.rb', line 28
def tag
self.class.tag || default_tag
end
|
#to_xml(xml) ⇒ Object
40
41
42
|
# File 'lib/openxml/docx/elements/element.rb', line 40
def to_xml(xml)
xml[namespace].public_send(tag, xml_attributes)
end
|