Class: Texd::Attachment::File

Inherits:
Base
  • Object
show all
Defined in:
lib/texd/attachment.rb

Instance Attribute Summary

Attributes inherited from Base

#absolute_path

Instance Method Summary collapse

Methods inherited from Base

#initialize, #name

Constructor Details

This class inherits a constructor from Texd::Attachment::Base

Instance Method Details

#to_upload_ioObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



221
222
223
224
225
# File 'lib/texd/attachment.rb', line 221

def to_upload_io(**)
  Multipart::Post::UploadIO.new(absolute_path.open("rb"), nil, name).tap { |io|
    io.instance_variable_set :@original_filename, name
  }
end