Class: S3AssetsUploader::Uploader
- Inherits:
-
Object
- Object
- S3AssetsUploader::Uploader
- Defined in:
- lib/s3_assets_uploader/uploader.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Uploader
constructor
A new instance of Uploader.
- #upload ⇒ Object
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
#upload ⇒ Object
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 |