Class: AniRuby::Frames
- Inherits:
-
Object
- Object
- AniRuby::Frames
- Includes:
- Enumerable
- Defined in:
- lib/aniruby/frames.rb
Overview
Collection of frames
Instance Method Summary collapse
- #[](index) ⇒ Frame
- #each(&block) ⇒ Object
-
#initialize(sprites) ⇒ Frames
constructor
Create a new collection of frames.
Constructor Details
Instance Method Details
#[](index) ⇒ Frame
18 19 20 |
# File 'lib/aniruby/frames.rb', line 18 def [](index) @frames[index] end |
#each(&block) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/aniruby/frames.rb', line 22 def each(&block) @frames.each do |frame| if block_given? block.call(frame) else yield frame end end end |