class Tus::Response
Object that responds to each
, length, and close
, suitable for returning as a Rack response body.
Public Class Methods
new(chunks:, close: ->{}
click to toggle source
# File lib/tus/response.rb, line 5 def initialize(chunks:, close: ->{}) @chunks = chunks @close = close end
Public Instance Methods
close()
click to toggle source
# File lib/tus/response.rb, line 14 def close @close.call end
each(&block)
click to toggle source
# File lib/tus/response.rb, line 10 def each(&block) @chunks.each(&block) end