class OoxmlParser::Transition
Class for data of Transition
Attributes
advance_on_click[RW]
delay[RW]
duration[RW]
properties[RW]
sound_action[RW]
speed[RW]
Public Instance Methods
parse(node)
click to toggle source
Parse Transition
object @param node [Nokogiri::XML:Element] node to parse @return [Transition] result of parsing
# File lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition.rb, line 13 def parse(node) node.xpath('*').each do |node_child| @properties = TransitionProperties.new(parent: self).parse(node_child) case node_child.name when 'sndAc' @sound_action = SoundAction.new(parent: self).parse(node_child) end end node.attributes.each do |key, value| case key when 'spd' @speed = value.value.to_sym when 'advClick' @advance_on_click = attribute_enabled?(value) when 'advTm' @delay = value.value.to_f / 1_000.0 when 'dur' @duration = value.value.to_f / 1_000.0 end end self end