Class: ConvertApi::UploadIO
- Inherits:
-
Object
- Object
- ConvertApi::UploadIO
- Defined in:
- lib/convert_api/upload_io.rb
Instance Method Summary collapse
- #file_ext ⇒ Object
- #file_id ⇒ Object
- #file_name ⇒ Object
-
#initialize(io, filename = nil) ⇒ UploadIO
constructor
A new instance of UploadIO.
- #to_s ⇒ Object
Constructor Details
#initialize(io, filename = nil) ⇒ UploadIO
Returns a new instance of UploadIO.
5 6 7 8 |
# File 'lib/convert_api/upload_io.rb', line 5 def initialize(io, filename = nil) @io = io @filename = filename || io_filename || raise(FileNameError, 'IO filename must be provided') end |
Instance Method Details
#file_ext ⇒ Object
22 23 24 |
# File 'lib/convert_api/upload_io.rb', line 22 def file_ext result['FileExt'] end |
#file_id ⇒ Object
14 15 16 |
# File 'lib/convert_api/upload_io.rb', line 14 def file_id result['FileId'] end |
#file_name ⇒ Object
18 19 20 |
# File 'lib/convert_api/upload_io.rb', line 18 def file_name result['FileName'] end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/convert_api/upload_io.rb', line 10 def to_s file_id end |