Class: OoxmlParser::CommonNonVisualProperties
- Inherits:
-
Object
- Object
- OoxmlParser::CommonNonVisualProperties
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id = '', name = '') ⇒ CommonNonVisualProperties
constructor
A new instance of CommonNonVisualProperties.
Constructor Details
#initialize(id = '', name = '') ⇒ CommonNonVisualProperties
Returns a new instance of CommonNonVisualProperties.
5 6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 5 def initialize(id = '', name = '') @id = id @name = name end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 3 def description @description end |
#hyperlink_for_hover ⇒ Object
Returns the value of attribute hyperlink_for_hover.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 3 def hyperlink_for_hover @hyperlink_for_hover end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 3 def name @name end |
#on_click_hyperlink ⇒ Object
Returns the value of attribute on_click_hyperlink.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 3 def on_click_hyperlink @on_click_hyperlink end |
Class Method Details
.parse(common_non_visual_properties_node) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/common_non_visual_properties.rb', line 10 def self.parse(common_non_visual_properties_node) non_visual_properties = CommonNonVisualProperties.new non_visual_properties.name = common_non_visual_properties_node.attribute('name').value non_visual_properties.id = common_non_visual_properties_node.attribute('id').value common_non_visual_properties_node.xpath('*').each do |cnv_props_node_child| case cnv_props_node_child.name when 'hlinkClick' non_visual_properties.on_click_hyperlink = Hyperlink.parse(cnv_props_node_child) when 'hlinkHover' non_visual_properties.hyperlink_for_hover = HyperlinkForHover.parse(cnv_props_node_child) end end non_visual_properties end |