Class: Valkyrie::StorageAdapter::StreamFile
- Inherits:
-
File
- Object
- Dry::Struct
- File
- Valkyrie::StorageAdapter::StreamFile
show all
- Defined in:
- lib/valkyrie/storage_adapter.rb
Instance Method Summary
collapse
Methods inherited from File
#checksum, #stream, #valid?
Instance Method Details
#close ⇒ Object
121
122
123
124
|
# File 'lib/valkyrie/storage_adapter.rb', line 121
def close
super
clean_tmp_file
end
|
#disk_path ⇒ Object
111
112
113
114
115
116
117
118
119
|
# File 'lib/valkyrie/storage_adapter.rb', line 111
def disk_path
path = Pathname.new(tmp_file.path)
if block_given?
yield path
clean_tmp_file
else
path
end
end
|