Class: Smartsheet::API::ImportPathFileSpec
- Inherits:
-
Object
- Object
- Smartsheet::API::ImportPathFileSpec
- Defined in:
- lib/smartsheet/api/file_spec.rb
Overview
Specification for file sheet import by path and MIME content type
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#file_length ⇒ Object
readonly
Returns the value of attribute file_length.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#upload_io ⇒ Object
readonly
Returns the value of attribute upload_io.
Instance Method Summary collapse
-
#initialize(path, content_type) ⇒ ImportPathFileSpec
constructor
A new instance of ImportPathFileSpec.
Constructor Details
#initialize(path, content_type) ⇒ ImportPathFileSpec
Returns a new instance of ImportPathFileSpec.
35 36 37 38 39 40 |
# File 'lib/smartsheet/api/file_spec.rb', line 35 def initialize(path, content_type) @file_length = File.size(path) @filename = nil @upload_io = Faraday::UploadIO.new(path, content_type) @content_type = content_type end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
33 34 35 |
# File 'lib/smartsheet/api/file_spec.rb', line 33 def content_type @content_type end |
#file_length ⇒ Object (readonly)
Returns the value of attribute file_length.
33 34 35 |
# File 'lib/smartsheet/api/file_spec.rb', line 33 def file_length @file_length end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
33 34 35 |
# File 'lib/smartsheet/api/file_spec.rb', line 33 def filename @filename end |
#upload_io ⇒ Object (readonly)
Returns the value of attribute upload_io.
33 34 35 |
# File 'lib/smartsheet/api/file_spec.rb', line 33 def upload_io @upload_io end |