Class: OoxmlParser::ShapeStyle
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::ShapeStyle
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb
Overview
Class for parsing ‘wps:style` tags
Instance Attribute Summary collapse
-
#effect_reference ⇒ FillReference
readonly
Effect reference.
-
#fill_reference ⇒ FillReference
readonly
Fill reference.
-
#font_reference ⇒ FontReference
readonly
Font reference.
-
#line_reference ⇒ LineReference
readonly
Line reference.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ ShapeStyle
Parse ShapeStyle object.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#effect_reference ⇒ FillReference (readonly)
Returns effect reference.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb', line 9 def effect_reference @effect_reference end |
#fill_reference ⇒ FillReference (readonly)
Returns fill reference.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb', line 11 def fill_reference @fill_reference end |
#font_reference ⇒ FontReference (readonly)
Returns font reference.
13 14 15 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb', line 13 def font_reference @font_reference end |
#line_reference ⇒ LineReference (readonly)
Returns line reference.
15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb', line 15 def line_reference @line_reference end |
Instance Method Details
#parse(node) ⇒ ShapeStyle
Parse ShapeStyle object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb', line 20 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'effectRef' @effect_reference = StyleMatrixReference.new(parent: self).parse(node_child) when 'fillRef' @fill_reference = StyleMatrixReference.new(parent: self).parse(node_child) when 'fontRef' @font_reference = FontReference.new(parent: self).parse(node_child) when 'lnRef' @line_reference = StyleMatrixReference.new(parent: self).parse(node_child) end end self end |