Class: Texd::Attachment::File
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #to_upload_io ⇒ Object private
Methods inherited from Base
Constructor Details
This class inherits a constructor from Texd::Attachment::Base
Instance Method Details
#to_upload_io ⇒ Object
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 |