Class: Tus::Storage::Filesystem::Response

Inherits:
Response
  • Object
show all
Defined in:
lib/tus/storage/filesystem.rb

Instance Method Summary collapse

Methods inherited from Response

#close, #each

Constructor Details

#initialize(path:, **options) ⇒ Response

Returns a new instance of Response.



141
142
143
144
# File 'lib/tus/storage/filesystem.rb', line 141

def initialize(path:, **options)
  super(**options)
  @path = path
end

Instance Method Details

#to_pathObject

Rack::Sendfile middleware needs response body to respond to #to_path



147
148
149
# File 'lib/tus/storage/filesystem.rb', line 147

def to_path
  @path
end