Skip to content

Instantly share code, notes, and snippets.

@steveh
Created March 27, 2012 23:16
Show Gist options
  • Select an option

  • Save steveh/2221360 to your computer and use it in GitHub Desktop.

Select an option

Save steveh/2221360 to your computer and use it in GitHub Desktop.
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