Class: OoxmlParser::CommonTiming
- Inherits:
-
Object
- Object
- OoxmlParser::CommonTiming
- Defined in:
- lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ CommonTiming
constructor
A new instance of CommonTiming.
Constructor Details
#initialize ⇒ CommonTiming
Returns a new instance of CommonTiming.
6 7 8 9 10 11 12 13 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 6 def initialize @id = nil @duration = nil @restart = nil @children = [] @start_conditions = [] @end_conditions = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 4 def children @children end |
#duration ⇒ Object
Returns the value of attribute duration.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 4 def duration @duration end |
#end_conditions ⇒ Object
Returns the value of attribute end_conditions.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 4 def end_conditions @end_conditions end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 4 def id @id end |
#restart ⇒ Object
Returns the value of attribute restart.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 4 def restart @restart end |
#start_conditions ⇒ Object
Returns the value of attribute start_conditions.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 4 def start_conditions @start_conditions end |
Class Method Details
.parse(common_time_node) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb', line 15 def self.parse(common_time_node) common_timing = CommonTiming.new common_timing.duration = common_time_node.attribute('dur').value unless common_time_node.attribute('dur').nil? common_timing.restart = common_time_node.attribute('restart').value unless common_time_node.attribute('restart').nil? common_timing.id = common_time_node.attribute('id').value common_time_node.xpath('*').each do |common_time_node_child| case common_time_node_child.name when 'stCondLst' common_timing.start_conditions = Condition.parse_list(common_time_node_child) when 'endCondLst' common_timing.end_conditions = Condition.parse_list(common_time_node_child) when 'childTnLst' common_timing.children = TimeNode.parse_list(common_time_node_child) end end common_timing end |