Class: Low::FileResponse
- Inherits:
-
Object
- Object
- Low::FileResponse
- Defined in:
- lib/responses/file_response.rb
Class Method Summary collapse
Class Method Details
.handle(event:) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/responses/file_response.rb', line 8 def handle(event:) file = event.file if File.exist?(file.path) response = Factories::ResponseFactory.file(path: file.path, content_type: file.content_type) return Events::ResponseEvent.new(response:) end nil end |