Class: Ale::Uploader

Inherits:
Object
  • Object
show all
Defined in:
lib/ale/uploader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#siteObject (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