Class: RenuoUpload::Uploader
- Inherits:
-
Object
- Object
- RenuoUpload::Uploader
- Defined in:
- lib/renuo_upload/uploader.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Uploader
constructor
A new instance of Uploader.
- #upload(file) ⇒ Object
Constructor Details
#initialize(config) ⇒ Uploader
Returns a new instance of Uploader.
7 8 9 10 |
# File 'lib/renuo_upload/uploader.rb', line 7 def initialize(config) @config = config @policy = retrieve_policy end |
Instance Method Details
#upload(file) ⇒ Object
12 13 14 15 |
# File 'lib/renuo_upload/uploader.rb', line 12 def upload(file) RestClient.post upload_url, upload_hash(file) uploaded_file_url file end |