Class: OoxmlParser::TimeNode
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TimeNode
- Defined in:
- lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb
Overview
Class for parsing TimeNode tags
Instance Attribute Summary collapse
-
#common_time_node ⇒ Object
Returns the value of attribute common_time_node.
-
#next_conditions_list ⇒ Object
Returns the value of attribute next_conditions_list.
-
#previous_conditions_list ⇒ Object
Returns the value of attribute previous_conditions_list.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(type = nil, parent: nil) ⇒ TimeNode
constructor
A new instance of TimeNode.
-
#parse(node) ⇒ TimeNode
Parse TimeNode.
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 = nil, parent: nil) ⇒ TimeNode
Returns a new instance of TimeNode.
11 12 13 14 15 16 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb', line 11 def initialize(type = nil, parent: nil) @type = type @previous_conditions_list = [] @next_conditions_list = [] super(parent: parent) end |
Instance Attribute Details
#common_time_node ⇒ Object
Returns the value of attribute common_time_node.
9 10 11 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb', line 9 def common_time_node @common_time_node end |
#next_conditions_list ⇒ Object
Returns the value of attribute next_conditions_list.
9 10 11 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb', line 9 def next_conditions_list @next_conditions_list end |
#previous_conditions_list ⇒ Object
Returns the value of attribute previous_conditions_list.
9 10 11 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb', line 9 def previous_conditions_list @previous_conditions_list end |
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb', line 9 def type @type end |
Instance Method Details
#parse(node) ⇒ TimeNode
Parse TimeNode
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node.rb', line 21 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'cTn' @common_time_node = CommonTiming.new(parent: self).parse(node_child) when 'prevCondLst' @previous_conditions_list = ConditionList.new(parent: self).parse(node_child) end end self end |