Class: HTTPClient::UploadIO
- Inherits:
-
Object
- Object
- HTTPClient::UploadIO
- Extended by:
- Forwardable
- Defined in:
- lib/httpclient/uploadio.rb,
lib/httpclient-uploadio/version.rb
Constant Summary collapse
- VERSION =
'1.0.1'
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #content_type ⇒ Object
-
#initialize(io, path = '') ⇒ UploadIO
constructor
A new instance of UploadIO.
Constructor Details
#initialize(io, path = '') ⇒ UploadIO
Returns a new instance of UploadIO.
12 13 14 15 |
# File 'lib/httpclient/uploadio.rb', line 12 def initialize(io, path = '') @io = io @path = path end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
10 11 12 |
# File 'lib/httpclient/uploadio.rb', line 10 def io @io end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/httpclient/uploadio.rb', line 10 def path @path end |
Instance Method Details
#content_type ⇒ Object
17 18 19 |
# File 'lib/httpclient/uploadio.rb', line 17 def content_type HTTP::Message.mime_type(path) end |