Module: Sinatra
- Defined in:
- lib/cloudflare_workers/stream.rb,
lib/cloudflare_workers/stream.rb
Overview
Override the stock ‘Sinatra::Base#stream` so upstream Sinatra apps that call it (without registering the helper module) also work on Workers. The upstream implementation (vendor/sinatra/base.rb:524) defers to EventMachine; Workers has no EM, so we re-route through the Cloudflare ReadableStream path. This is explicit: calling `register Sinatra::Streaming` still gets you the merging DSL above; bare `stream do |out| … end` still works via this override.