Class: OoxmlParser::CommonNonVisualProperties
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::CommonNonVisualProperties
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb
Overview
Class for ‘cNvPr` data
Instance Attribute Summary collapse
-
#description ⇒ String
Description of shape.
-
#hyperlink_for_hover ⇒ Object
Returns the value of attribute hyperlink_for_hover.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#on_click_hyperlink ⇒ Object
Returns the value of attribute on_click_hyperlink.
-
#title ⇒ String
Title of shape.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ CommonNonVisualProperties
Parse CommonNonVisualProperties 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
#description ⇒ String
Returns description of shape.
10 11 12 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 10 def description @description end |
#hyperlink_for_hover ⇒ Object
Returns the value of attribute hyperlink_for_hover.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 6 def hyperlink_for_hover @hyperlink_for_hover end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 6 def name @name end |
#on_click_hyperlink ⇒ Object
Returns the value of attribute on_click_hyperlink.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 6 def on_click_hyperlink @on_click_hyperlink end |
#title ⇒ String
Returns title of shape.
8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 8 def title @title end |
Instance Method Details
#parse(node) ⇒ CommonNonVisualProperties
Parse CommonNonVisualProperties object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb', line 15 def parse(node) node.attributes.each do |key, value| case key when 'name' @name = value.value when 'id' @id = value.value when 'title' @title = value.value when 'descr' @description = value.value end end node.xpath('*').each do |node_child| case node_child.name when 'hlinkClick' @on_click_hyperlink = Hyperlink.new(parent: self).parse(node_child) when 'hlinkHover' @hyperlink_for_hover = Hyperlink.new(parent: self).parse(node_child) end end self end |