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.



138
139
140
141
# File 'lib/tus/storage/filesystem.rb', line 138

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



144
145
146
# File 'lib/tus/storage/filesystem.rb', line 144

def to_path
  @path
end