Class: Holoserve::Connector::Tool::Uploader
- Inherits:
-
Object
- Object
- Holoserve::Connector::Tool::Uploader
- Defined in:
- lib/holoserve/connector/tool/uploader.rb
Instance Method Summary collapse
-
#initialize(filename, http_method, url, options = { }) ⇒ Uploader
constructor
A new instance of Uploader.
- #upload ⇒ Object
Constructor Details
#initialize(filename, http_method, url, options = { }) ⇒ Uploader
Returns a new instance of Uploader.
5 6 7 |
# File 'lib/holoserve/connector/tool/uploader.rb', line 5 def initialize(filename, http_method, url, = { }) @filename, @http_method, @url, @options = filename, http_method, url, end |
Instance Method Details
#upload ⇒ Object
9 10 11 |
# File 'lib/holoserve/connector/tool/uploader.rb', line 9 def upload Transport::HTTP.request @http_method, @url, @options.merge(:headers => headers, :body => body) end |