Class: HTTPX::Transcoder::Multipart::FilePart
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- HTTPX::Transcoder::Multipart::FilePart
- Defined in:
- lib/httpx/transcoder/multipart/decoder.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#original_filename ⇒ Object
readonly
Returns the value of attribute original_filename.
Instance Method Summary collapse
-
#initialize(filename, content_type) ⇒ FilePart
constructor
A new instance of FilePart.
Constructor Details
#initialize(filename, content_type) ⇒ FilePart
Returns a new instance of FilePart.
12 13 14 15 16 17 |
# File 'lib/httpx/transcoder/multipart/decoder.rb', line 12 def initialize(filename, content_type) @original_filename = filename @content_type = content_type @file = Tempfile.new("httpx", encoding: Encoding::BINARY, mode: File::RDWR) super(@file) end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
10 11 12 |
# File 'lib/httpx/transcoder/multipart/decoder.rb', line 10 def content_type @content_type end |
#original_filename ⇒ Object (readonly)
Returns the value of attribute original_filename.
10 11 12 |
# File 'lib/httpx/transcoder/multipart/decoder.rb', line 10 def original_filename @original_filename end |