Class: FutureFileItem
- Inherits:
-
Object
- Object
- FutureFileItem
- Defined in:
- lib/we_transfer_client/future_file_item.rb
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ FutureFileItem
constructor
A new instance of FutureFileItem.
- #to_item_request_params ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ FutureFileItem
Returns a new instance of FutureFileItem.
2 3 4 |
# File 'lib/we_transfer_client/future_file_item.rb', line 2 def initialize(**kwargs) super(local_identifier: SecureRandom.uuid, **kwargs) end |
Instance Method Details
#to_item_request_params ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/we_transfer_client/future_file_item.rb', line 6 def to_item_request_params # Ideally the content identifier should stay the same throughout multiple # calls if the file contents doesn't change. { content_identifier: 'file', local_identifier: local_identifier, filename: name, filesize: io.size, } end |