Class: ConvertApi::UploadIO
- Inherits:
-
Object
- Object
- ConvertApi::UploadIO
- Defined in:
- lib/convert_api/upload_io.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#io ⇒ Object
readonly
Returns the value of attribute io.
Instance Method Summary collapse
- #file_id ⇒ Object
-
#initialize(io, filename = nil) ⇒ UploadIO
constructor
A new instance of UploadIO.
- #to_s ⇒ Object
Constructor Details
#initialize(io, filename = nil) ⇒ UploadIO
7 8 9 10 |
# File 'lib/convert_api/upload_io.rb', line 7 def initialize(io, filename = nil) @io = io @filename = filename || io_filename || raise(FileNameError, 'IO filename must be provided') end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
5 6 7 |
# File 'lib/convert_api/upload_io.rb', line 5 def filename @filename end |
#io ⇒ Object (readonly)
Returns the value of attribute io.
5 6 7 |
# File 'lib/convert_api/upload_io.rb', line 5 def io @io end |
Instance Method Details
#file_id ⇒ Object
16 17 18 |
# File 'lib/convert_api/upload_io.rb', line 16 def file_id @file_id ||= upload_file['FileId'] end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/convert_api/upload_io.rb', line 12 def to_s file_id end |