Class: Pakyow::Connection::MultipartInput
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Pakyow::Connection::MultipartInput
- Defined in:
- lib/pakyow/connection/multipart_input.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#type ⇒ Object
(also: #media_type)
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(filename:, headers:, type:) ⇒ MultipartInput
constructor
A new instance of MultipartInput.
-
#pp(*args) ⇒ Object
Fixes an issue using pp inside a delegator.
Constructor Details
#initialize(filename:, headers:, type:) ⇒ MultipartInput
Returns a new instance of MultipartInput.
10 11 12 13 |
# File 'lib/pakyow/connection/multipart_input.rb', line 10 def initialize(filename:, headers:, type:) @filename, @headers, @type = filename, headers, type __setobj__(Tempfile.new(["PakyowMultipart", File.extname(filename)])) end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
8 9 10 |
# File 'lib/pakyow/connection/multipart_input.rb', line 8 def filename @filename end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
8 9 10 |
# File 'lib/pakyow/connection/multipart_input.rb', line 8 def headers @headers end |
#type ⇒ Object (readonly) Also known as: media_type
Returns the value of attribute type.
8 9 10 |
# File 'lib/pakyow/connection/multipart_input.rb', line 8 def type @type end |
Instance Method Details
#pp(*args) ⇒ Object
Fixes an issue using pp inside a delegator.
19 20 21 |
# File 'lib/pakyow/connection/multipart_input.rb', line 19 def pp(*args) Kernel.pp(*args) end |