Class: CoreLibrary::FileWrapper
- Inherits:
-
Object
- Object
- CoreLibrary::FileWrapper
- Defined in:
- lib/apimatic-core/types/sdk/file_wrapper.rb
Overview
A utility to allow users to set the content-type for files
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
-
#initialize(file, content_type: 'application/octet-stream') ⇒ FileWrapper
constructor
Initializes a new instance of FileWrapper.
Constructor Details
#initialize(file, content_type: 'application/octet-stream') ⇒ FileWrapper
Initializes a new instance of FileWrapper.
9 10 11 12 |
# File 'lib/apimatic-core/types/sdk/file_wrapper.rb', line 9 def initialize(file, content_type: 'application/octet-stream') @file = file @content_type = content_type end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
4 5 6 |
# File 'lib/apimatic-core/types/sdk/file_wrapper.rb', line 4 def content_type @content_type end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
4 5 6 |
# File 'lib/apimatic-core/types/sdk/file_wrapper.rb', line 4 def file @file end |