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
124
125
126
127
|
# File 'lib/valkyrie/storage_adapter.rb', line 124
def close
super
clean_tmp_file
end
|
#disk_path ⇒ Object
111
112
113
114
115
116
117
118
119
120
121
122
|
# File 'lib/valkyrie/storage_adapter.rb', line 111
def disk_path
path = Pathname.new(tmp_file.path)
if block_given?
begin
yield path
ensure
clean_tmp_file
end
else
path
end
end
|