Class: Tus::Storage::Gridfs::Response

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Response.



241
242
243
244
245
# File 'lib/tus/storage/gridfs.rb', line 241

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

Instance Method Details

#closeObject



255
256
257
# File 'lib/tus/storage/gridfs.rb', line 255

def close
  @close.call
end

#each(&block) ⇒ Object



251
252
253
# File 'lib/tus/storage/gridfs.rb', line 251

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

#lengthObject



247
248
249
# File 'lib/tus/storage/gridfs.rb', line 247

def length
  @length
end