Class: Ale::Uploader
- Inherits:
-
Object
- Object
- Ale::Uploader
- Defined in:
- lib/ale/uploader.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
readonly
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize(site) ⇒ Uploader
constructor
A new instance of Uploader.
- #setup! ⇒ Object
- #upload! ⇒ Object
Constructor Details
#initialize(site) ⇒ Uploader
Returns a new instance of Uploader.
10 11 12 |
# File 'lib/ale/uploader.rb', line 10 def initialize(site) @site = site end |
Instance Attribute Details
#site ⇒ Object (readonly)
Returns the value of attribute site.
3 4 5 |
# File 'lib/ale/uploader.rb', line 3 def site @site end |
Instance Method Details
#setup! ⇒ Object
5 6 7 8 |
# File 'lib/ale/uploader.rb', line 5 def setup! Ale::Bucket.create(Ale::Config.bucket) bucket.enable_website end |
#upload! ⇒ Object
14 15 16 17 |
# File 'lib/ale/uploader.rb', line 14 def upload! remove_stale_files_from_s3 send_local_files_to_s3 end |