Class: OoxmlParser::TransitionProperties

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb

Overview

Class for data for TransitionProperties

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#directionObject

Returns the value of attribute direction.



7
8
9
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 7

def direction
  @direction
end

#orientationObject

Returns the value of attribute orientation.



7
8
9
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 7

def orientation
  @orientation
end

#spokesObject

Returns the value of attribute spokes.



7
8
9
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 7

def spokes
  @spokes
end

#through_blackObject

Returns the value of attribute through_black.



7
8
9
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 7

def through_black
  @through_black
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 7

def type
  @type
end

#wheelWheel (readonly)

Returns Wheel Slide Transition.

Returns:

  • (Wheel)

    Wheel Slide Transition



9
10
11
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 9

def wheel
  @wheel
end

Instance Method Details

#parse(node) ⇒ TransitionProperties

Parse TransitionProperties object

Parameters:

  • node (Nokogiri::XML:Element)

    node to parse

Returns:



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb', line 14

def parse(node)
  @type = node.name.to_sym
  case node.name
  when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
    @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
  when 'cut', 'fade'
    @through_black = option_enabled?(node, 'thruBlk')
  when 'split'
    @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
    @orientation = node.attribute('orient').value.to_sym if node.attribute('orient')
  when 'wheel'
    @wheel = Wheel.new(parent: self).parse(node)
  end
  self
end