Class: MotionWizard::AnimationStrategy::BaseAnimationStrategy
- Inherits:
-
Object
- Object
- MotionWizard::AnimationStrategy::BaseAnimationStrategy
- Defined in:
- lib/motion-wizard/animation_strategy/base_animation_strategy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#already_on_final_position ⇒ Object
Returns the value of attribute already_on_final_position.
-
#duration ⇒ Object
Returns the value of attribute duration.
Instance Method Summary collapse
- #animate ⇒ Object
- #hide_view(view, &after_block) ⇒ Object
-
#initialize ⇒ BaseAnimationStrategy
constructor
A new instance of BaseAnimationStrategy.
- #show_view(view, &after_block) ⇒ Object
Constructor Details
#initialize ⇒ BaseAnimationStrategy
Returns a new instance of BaseAnimationStrategy.
6 7 8 |
# File 'lib/motion-wizard/animation_strategy/base_animation_strategy.rb', line 6 def initialize @duration = 0.5 end |
Instance Attribute Details
#already_on_final_position ⇒ Object
Returns the value of attribute already_on_final_position.
4 5 6 |
# File 'lib/motion-wizard/animation_strategy/base_animation_strategy.rb', line 4 def already_on_final_position @already_on_final_position end |
#duration ⇒ Object
Returns the value of attribute duration.
4 5 6 |
# File 'lib/motion-wizard/animation_strategy/base_animation_strategy.rb', line 4 def duration @duration end |
Instance Method Details
#animate ⇒ Object
20 21 22 |
# File 'lib/motion-wizard/animation_strategy/base_animation_strategy.rb', line 20 def animate raise "Subclass responsability" end |
#hide_view(view, &after_block) ⇒ Object
15 16 17 18 |
# File 'lib/motion-wizard/animation_strategy/base_animation_strategy.rb', line 15 def hide_view(view, &after_block) @hide_view = view @hide_view_after_block = after_block end |
#show_view(view, &after_block) ⇒ Object
10 11 12 13 |
# File 'lib/motion-wizard/animation_strategy/base_animation_strategy.rb', line 10 def show_view(view, &after_block) @show_view = view @show_view_after_block = after_block end |