Module: AppleNews::Animation
- Extended by:
- Animation
- Included in:
- Animation
- Defined in:
- lib/apple-news/animation.rb,
lib/apple-news/animations/base.rb,
lib/apple-news/animations/appear.rb,
lib/apple-news/animations/fade_in.rb,
lib/apple-news/animations/move_in.rb,
lib/apple-news/animations/scale_fade.rb
Defined Under Namespace
Classes: Appear, Base, FadeIn, MoveIn, ScaleFade
Instance Method Summary collapse
Instance Method Details
#factory(data) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/apple-news/animation.rb', line 8 def factory(data) return if data.nil? animations.each do |animation| if animation.type == data[:type] return animation.new(data) end end nil end |