Class: OoxmlParser::TransitionProperties
- Inherits:
-
Object
- Object
- OoxmlParser::TransitionProperties
- Defined in:
- lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#orientation ⇒ Object
Returns the value of attribute orientation.
-
#spokes ⇒ Object
Returns the value of attribute spokes.
-
#through_black ⇒ Object
Returns the value of attribute through_black.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
-
.parse(node) ⇒ TransitionProperties
Parse TransitionProperties object.
Instance Method Summary collapse
-
#initialize(type = nil) ⇒ TransitionProperties
constructor
A new instance of TransitionProperties.
Constructor Details
#initialize(type = nil) ⇒ TransitionProperties
Returns a new instance of TransitionProperties.
5 6 7 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 5 def initialize(type = nil) @type = type end |
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 3 def direction @direction end |
#orientation ⇒ Object
Returns the value of attribute orientation.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 3 def orientation @orientation end |
#spokes ⇒ Object
Returns the value of attribute spokes.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 3 def spokes @spokes end |
#through_black ⇒ Object
Returns the value of attribute through_black.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 3 def through_black @through_black end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 3 def type @type end |
Class Method Details
.parse(node) ⇒ TransitionProperties
Parse TransitionProperties object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb', line 12 def self.parse(node) transition_properties = TransitionProperties.new transition_properties.type = node.name.to_sym case node.name when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp' transition_properties.direction = Alignment.parse(node.attribute('dir')) if node.attribute('dir') when 'cut', 'fade' transition_properties.through_black = OOXMLDocumentObject.option_enabled?(node, 'thruBlk') when 'split' transition_properties.direction = Alignment.parse(node.attribute('dir')) if node.attribute('dir') transition_properties.orientation = node.attribute('orient').value.to_sym if node.attribute('orient') when 'wheel', 'wheelReverse' transition_properties.spokes = OOXMLDocumentObject.option_enabled?(node, 'spokes') end transition_properties end |