sintaxi (owner)

Revisions

gist: 226738 Download_button fork
public
Public Clone URL: git://gist.github.com/226738.git
Embed All Files: show embed
cloud.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
###############
# Wrong
###############
 
# add
AWS::S3::S3Object.store(path, blob, 'bookriff')
 
# get
AWS::S3::BUCKET.find(path, 'bookriff')
 
###############
# Right
###############
 
# create a model
class Cloud << AWS::S3::S3Object
    set_current_bucket_to "bookriff"
end
 
# add
Cloud.store(path, blob)
 
# get
Cloud.get(path)