Class: RubstApi::UploadFile
- Inherits:
-
Object
- Object
- RubstApi::UploadFile
- Defined in:
- lib/rubst_api/params.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#io ⇒ Object
readonly
Returns the value of attribute io.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(filename:, io:, content_type: "application/octet-stream", headers: {}) ⇒ UploadFile
constructor
A new instance of UploadFile.
- #read ⇒ Object
- #rewind ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(filename:, io:, content_type: "application/octet-stream", headers: {}) ⇒ UploadFile
Returns a new instance of UploadFile.
35 36 37 |
# File 'lib/rubst_api/params.rb', line 35 def initialize(filename:, io:, content_type: "application/octet-stream", headers: {}) @filename, @io, @content_type, @headers = filename, io, content_type, headers end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
34 35 36 |
# File 'lib/rubst_api/params.rb', line 34 def content_type @content_type end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
34 35 36 |
# File 'lib/rubst_api/params.rb', line 34 def filename @filename end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
34 35 36 |
# File 'lib/rubst_api/params.rb', line 34 def headers @headers end |
#io ⇒ Object (readonly)
Returns the value of attribute io.
34 35 36 |
# File 'lib/rubst_api/params.rb', line 34 def io @io end |
Instance Method Details
#close ⇒ Object
40 |
# File 'lib/rubst_api/params.rb', line 40 def close = io.close |
#read ⇒ Object
38 |
# File 'lib/rubst_api/params.rb', line 38 def read(...) = io.read(...) |
#rewind ⇒ Object
39 |
# File 'lib/rubst_api/params.rb', line 39 def rewind = io.rewind |
#size ⇒ Object
41 |
# File 'lib/rubst_api/params.rb', line 41 def size = io.size |