Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rack-backed custom URL protocol for your MacRuby application
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
README.md

README.md

RackURLProtocol

Adds a Rack-backed custom URL protocol to your MacRuby application.

Example (hit rack://hello in a WebKit view):

require "rack_url_protocol"

app = Proc.new do |env|
  body = "Hello, #{env["PATH_INFO"]}!"
  [200, { "Content-Length" => body.length.to_s, 
          "Content-Type" => "text/plain" }, [body]]
end

RackURLProtocol.register("rack", withRackApplication: app)
Something went wrong with that request. Please try again.