Skip to content

Instantly share code, notes, and snippets.

View jedediah's full-sized avatar

Jedediah Smith jedediah

View GitHub Profile
require 'sinatra'
require 'sinatra/strands'
require 'haml'
helpers do
def message locals={}
haml :message,
:locals => {:uri => strand_uri }.merge(locals)
end
end
require 'sinatra/base'
require 'fiber'
module Sinatra
module Strands
REQUEST_METHODS = [:get,:put,:post,:delete]
class Strand
def initialize *args, &block
@secure_id = object_id # TODO: not actually secure
@fiber = Fiber.new do