Created
March 27, 2012 23:16
-
-
Save steveh/2221360 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| module AWS | |
| class S3 | |
| class ObjectCollection | |
| protected | |
| def each_member_in_page(page, &block) | |
| super | |
| page.contents.each do |content| | |
| yield(S3Object.new(bucket, content.key, { :etag => content.etag })) | |
| end | |
| end | |
| end | |
| end | |
| end | |
| module AWS | |
| class S3 | |
| class S3Object | |
| attr_reader :etag_from_list | |
| def initialize(bucket, key, opts = {}) | |
| @etag_from_list = opts.delete(:etag) | |
| super | |
| @key = key | |
| @bucket = bucket | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment