Class: MotionWizard::AnimationStrategy::BaseAnimationStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-wizard/animation_strategy/base_animation_strategy.rb

Direct Known Subclasses

None, SlideAnimation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBaseAnimationStrategy

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_positionObject

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

#durationObject

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

#animateObject



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