Method: Ray::Animation::Combination#push
- Defined in:
- lib/ray/animation/combination.rb
#push(*animations) ⇒ Object Also known as: <<
Adds several animations to this combination.
41 42 43 44 45 46 47 |
# File 'lib/ray/animation/combination.rb', line 41 def push(*animations) @animations.concat(animations) max_duration = animations.map(&:duration).max || 0 self.duration = max_duration if max_duration > duration self end |