Class: S3AssetsUploader::Uploader

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

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Uploader

Returns a new instance of Uploader.



6
7
8
9
10
# File 'lib/s3_assets_uploader/uploader.rb', line 6

def initialize(&block)
  @config = Config.new
  block.call(@config)
  @config.validate!
end

Instance Method Details

#uploadObject



12
13
14
15
16
17
# File 'lib/s3_assets_uploader/uploader.rb', line 12

def upload
  upload_path(@config.assets_path)
  @config.additional_paths.each do |path|
    upload_path(Pathname.new(path))
  end
end