Class: S3ObjectProxy
- Inherits:
-
Object
- Object
- S3ObjectProxy
- Defined in:
- lib/s3_object_proxy.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ S3ObjectProxy
constructor
A new instance of S3ObjectProxy.
- #url ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ S3ObjectProxy
Returns a new instance of S3ObjectProxy.
7 8 9 10 |
# File 'lib/s3_object_proxy.rb', line 7 def initialize( = {}) @path = [:path] initialize_s3() end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
5 6 7 |
# File 'lib/s3_object_proxy.rb', line 5 def bucket @bucket end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/s3_object_proxy.rb', line 4 def path @path end |
Class Method Details
.search(prefix, options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/s3_object_proxy.rb', line 20 def self.search(prefix, = {}) = load_yaml().merge() connect_to_s3() AWS::S3::Bucket.objects([:bucket], :prefix => prefix) end |
Instance Method Details
#url ⇒ Object
12 13 14 |
# File 'lib/s3_object_proxy.rb', line 12 def url AWS::S3::S3Object.url_for(path, bucket, :authenticated => false) end |
#value ⇒ Object
16 17 18 |
# File 'lib/s3_object_proxy.rb', line 16 def value AWS::S3::S3Object.value(path, bucket) end |