Class: OoxmlParser::HyperlinkForHover

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb

Overview

Class for parsing hlinkHover tags

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

#initialize(id = '', action = '') ⇒ HyperlinkForHover

Returns a new instance of HyperlinkForHover.



6
7
8
9
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 6

def initialize(id = '', action = '')
  @id = id
  @action = action
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



4
5
6
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 4

def action
  @action
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 4

def id
  @id
end

#soundObject

Returns the value of attribute sound.



4
5
6
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 4

def sound
  @sound
end

Instance Method Details

#parse(node) ⇒ HyperlinkForHover

Parse HyperlinkForHover

Parameters:

  • node (Nokogiri::XML:Node)

    with NumberingProperties

Returns:



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb', line 14

def parse(node)
  @id = node.attribute('id').value
  @action = node.attribute('action').value
  node.xpath('*').each do |hyperlink_for_hover_node_child|
    case hyperlink_for_hover_node_child.name
    when 'snd'
      @sound = Sound.new(parent: self).parse(hyperlink_for_hover_node_child)
    end
  end
  self
end