Class: OoxmlParser::HyperlinkForHover
- Inherits:
-
Object
- Object
- OoxmlParser::HyperlinkForHover
- Defined in:
- lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#id ⇒ Object
Returns the value of attribute id.
-
#sound ⇒ Object
Returns the value of attribute sound.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id = '', action = '') ⇒ HyperlinkForHover
constructor
A new instance of HyperlinkForHover.
Constructor Details
#initialize(id = '', action = '') ⇒ HyperlinkForHover
Returns a new instance of HyperlinkForHover.
5 6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 5 def initialize(id = '', action = '') @id = id @action = action end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 3 def action @action end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 3 def id @id end |
#sound ⇒ Object
Returns the value of attribute sound.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 3 def sound @sound end |
Class Method Details
.parse(hyperlink_for_hover_node) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 10 def self.parse(hyperlink_for_hover_node) hyperlink_for_hover = HyperlinkForHover.new hyperlink_for_hover.id = hyperlink_for_hover_node.attribute('id').value hyperlink_for_hover.action = hyperlink_for_hover_node.attribute('action').value hyperlink_for_hover_node.xpath('*').each do |hyperlink_for_hover_node_child| case hyperlink_for_hover_node_child.name when 'snd' hyperlink_for_hover.sound = Sound.parse(hyperlink_for_hover_node_child) end end hyperlink_for_hover end |