Class: ImageServer::AttachmentUploader
- Inherits:
-
Object
- Object
- ImageServer::AttachmentUploader
- Defined in:
- lib/image_server/attachment_uploader.rb
Instance Method Summary collapse
-
#initialize(namespace, hash, configuration: ImageServer.configuration) ⇒ AttachmentUploader
constructor
A new instance of AttachmentUploader.
- #upload(name, source) ⇒ Object
Constructor Details
#initialize(namespace, hash, configuration: ImageServer.configuration) ⇒ AttachmentUploader
Returns a new instance of AttachmentUploader.
5 6 7 8 9 |
# File 'lib/image_server/attachment_uploader.rb', line 5 def initialize(namespace, hash, configuration: ImageServer.configuration) @namespace = namespace @hash = hash @configuration = configuration end |
Instance Method Details
#upload(name, source) ⇒ Object
11 12 13 14 |
# File 'lib/image_server/attachment_uploader.rb', line 11 def upload(name, source) uploader = Adapters::Http.new(@namespace, source, configuration: @configuration) properties_json = uploader.upload(uri(name)) end |