Class: OoxmlParser::CommonTiming
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::CommonTiming
- Defined in:
- lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb
Overview
Class for data of CommonTiming
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#end_conditions ⇒ Object
Returns the value of attribute end_conditions.
-
#id ⇒ Object
Returns the value of attribute id.
-
#restart ⇒ Object
Returns the value of attribute restart.
-
#start_conditions ⇒ Object
Returns the value of attribute start_conditions.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ CommonTiming
constructor
A new instance of CommonTiming.
-
#parse(node) ⇒ CommonTiming
Parse CommonTiming 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(parent: nil) ⇒ CommonTiming
Returns a new instance of CommonTiming.
9 10 11 12 13 14 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 9 def initialize(parent: nil) @children = [] @start_conditions = [] @end_conditions = [] super(parent: parent) end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 7 def children @children end |
#duration ⇒ Object
Returns the value of attribute duration.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 7 def duration @duration end |
#end_conditions ⇒ Object
Returns the value of attribute end_conditions.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 7 def end_conditions @end_conditions end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 7 def id @id end |
#restart ⇒ Object
Returns the value of attribute restart.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 7 def restart @restart end |
#start_conditions ⇒ Object
Returns the value of attribute start_conditions.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 7 def start_conditions @start_conditions end |
Instance Method Details
#parse(node) ⇒ CommonTiming
Parse CommonTiming object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/slide/timing/time_node_list/time_node/common_timing.rb', line 19 def parse(node) node.attributes.each do |key, value| case key when 'dur' @duration = value.value when 'restart' @restart = value.value when 'id' @id = value.value end end node.xpath('*').each do |node_child| case node_child.name when 'stCondLst' @start_conditions = ConditionList.new(parent: self).parse(node_child) when 'endCondLst' @end_conditions = ConditionList.new(parent: self).parse(node_child) when 'childTnLst' @children = TimeNodeList.new(parent: self).parse(node_child).elements end end self end |