Class: OoxmlParser::TargetElement
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TargetElement
- Defined in:
- lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb
Overview
Class for data for Target Element
Instance Attribute Summary collapse
-
#built_in ⇒ Object
Returns the value of attribute built_in.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(type = '', id = '', parent: nil) ⇒ TargetElement
constructor
A new instance of TargetElement.
-
#parse(node) ⇒ TargetElement
Parse TargetElement object.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(type = '', id = '', parent: nil) ⇒ TargetElement
Returns a new instance of TargetElement.
8 9 10 11 12 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb', line 8 def initialize(type = '', id = '', parent: nil) @type = type @id = id super(parent: parent) end |
Instance Attribute Details
#built_in ⇒ Object
Returns the value of attribute built_in.
6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb', line 6 def built_in @built_in end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb', line 6 def type @type end |
Instance Method Details
#parse(node) ⇒ TargetElement
Parse TargetElement object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/set_time_node/behavior/target_element.rb', line 17 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'spTgt' @type = :shape @id = node_child.attribute('spid').value end end self end |