Class: OoxmlParser::AnimationEffect
- Inherits:
-
Object
- Object
- OoxmlParser::AnimationEffect
- Defined in:
- lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb
Instance Attribute Summary collapse
-
#behavior ⇒ Object
Returns the value of attribute behavior.
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#transition ⇒ Object
Returns the value of attribute transition.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(behavior = nil) ⇒ AnimationEffect
constructor
A new instance of AnimationEffect.
Constructor Details
#initialize(behavior = nil) ⇒ AnimationEffect
Returns a new instance of AnimationEffect.
5 6 7 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb', line 5 def initialize(behavior = nil) @behavior = behavior end |
Instance Attribute Details
#behavior ⇒ Object
Returns the value of attribute behavior.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb', line 3 def behavior @behavior end |
#filter ⇒ Object
Returns the value of attribute filter.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb', line 3 def filter @filter end |
#transition ⇒ Object
Returns the value of attribute transition.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb', line 3 def transition @transition end |
Class Method Details
.parse(animation_effect_node) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb', line 9 def self.parse(animation_effect_node) animation_effect = AnimationEffect.new animation_effect.transition = animation_effect_node.attribute('transition').value if animation_effect_node.attribute('transition') animation_effect.filter = animation_effect_node.attribute('filter').value if animation_effect_node.attribute('filter') animation_effect_node.xpath('*').each do |animation_effect_node_child| case animation_effect_node_child.name when 'cBhvr' animation_effect.behavior = Behavior.parse(animation_effect_node_child) end end animation_effect end |