module S3::ObjectsExtension
Public Instance Methods
build(key)
click to toggle source
Builds the object in the bucket with given key
# File lib/s3/objects_extension.rb, line 4 def build(key) Object.send(:new, proxy_owner, :key => key) end
destroy_all()
click to toggle source
Destroys all keys in the bucket
# File lib/s3/objects_extension.rb, line 33 def destroy_all proxy_target.each { |object| object.destroy } end
find_all(options = {})
click to toggle source
Finds the objects in the bucket.
Options¶ ↑
-
:prefix
- Limits the response to keys which begin with the indicated prefix -
:marker
- Indicates where in the bucket to begin listing -
:max_keys
- The maximum number of keys you'd like to see -
:delimiter
- Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element
# File lib/s3/objects_extension.rb, line 28 def find_all(options = {}) proxy_owner.send(:list_bucket, options) end
find_first(name)
click to toggle source
Finds first object with given name or raises the exception if not found
# File lib/s3/objects_extension.rb, line 10 def find_first(name) object = build(name) object.retrieve end
Also aliased as: find