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

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

Instance Method Summary collapse

Constructor Details

#initialize(chunks:, close:, length:) ⇒ Response

Returns a new instance of Response.



123
124
125
126
127
# File 'lib/tus/storage/filesystem.rb', line 123

def initialize(chunks:, close:, length:)
  @chunks = chunks
  @close  = close
  @length = length
end

Instance Method Details

#closeObject



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

def close
  @close.call
end

#each(&block) ⇒ Object



133
134
135
# File 'lib/tus/storage/filesystem.rb', line 133

def each(&block)
  @chunks.each(&block)
end

#lengthObject



129
130
131
# File 'lib/tus/storage/filesystem.rb', line 129

def length
  @length
end