lib/ury_rapid/services/response_buffer.rb
# Tries to satisfy a request for data
#
# @return [Boolean]  True if the request was satisfied; false otherwise.
Tries to satisfy a request for data
Tries to satisfy a request for data
def try_satisfy_request(request)
        num_bytes, block = request
        (num_bytes <= @buffer.bytesize).tap do |enough_bytes|
          block.call(shift_buffer(num_bytes)) if enough_bytes
        end
      end
def try_satisfy_request ( request ) num_bytes , block = request ( num_bytes <= @buffer . bytesize ) . tap do | enough_bytes | block . call ( shift_buffer ( num_bytes ) ) if enough_bytes end end
Tries to satisfy a request for data
Tries to satisfy a request for data
True if the request was satisfied; false otherwise.
True if the request was satisfied ; false otherwise .
Boolean
request