Class: PyramidScheme::Lock::S3
- Defined in:
- lib/pyramid_scheme/lock/s3.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #exists? ⇒ Boolean
-
#initialize ⇒ S3
constructor
A new instance of S3.
Constructor Details
#initialize ⇒ S3
Returns a new instance of S3.
4 5 6 |
# File 'lib/pyramid_scheme/lock/s3.rb', line 4 def initialize PyramidScheme::IndexProvider::S3.establish_connection! end |
Instance Method Details
#create ⇒ Object
12 13 14 |
# File 'lib/pyramid_scheme/lock/s3.rb', line 12 def create AWS::S3::S3Object.store(key_name, "", bucket) end |
#destroy ⇒ Object
16 17 18 |
# File 'lib/pyramid_scheme/lock/s3.rb', line 16 def destroy AWS::S3::S3Object.delete(key_name, bucket) end |
#exists? ⇒ Boolean
8 9 10 |
# File 'lib/pyramid_scheme/lock/s3.rb', line 8 def exists? AWS::S3::S3Object.exists?(key_name, bucket) end |