This repository has been archived by the owner on Jan 6, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes more sense to have image iterator simply provide functionality …
…as a module..
- Loading branch information
1 parent
3397cf6
commit cca77a3
Showing
5 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
class ImageIterator | ||
def initialize(urls=[]) | ||
@urls = urls | ||
@enum = @urls.to_enum | ||
module ImageIterator | ||
def enum | ||
@enum ||= @images.to_enum | ||
end | ||
|
||
def next | ||
Kernel.open(@enum.next) | ||
Kernel.open(enum.next) | ||
end | ||
|
||
def rewind | ||
@enum.rewind | ||
enum.rewind | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters