Module Rack
In: lib/rack.rb
lib/rack/builder.rb
lib/rack/cascade.rb
lib/rack/commonlogger.rb
lib/rack/conditionalget.rb
lib/rack/content_length.rb
lib/rack/deflater.rb
lib/rack/directory.rb
lib/rack/file.rb
lib/rack/forward.rb
lib/rack/handler.rb
lib/rack/head.rb
lib/rack/lint.rb
lib/rack/lobster.rb
lib/rack/methodoverride.rb
lib/rack/mime.rb
lib/rack/mock.rb
lib/rack/recursive.rb
lib/rack/reloader.rb
lib/rack/request.rb
lib/rack/response.rb
lib/rack/showexceptions.rb
lib/rack/showstatus.rb
lib/rack/static.rb
lib/rack/urlmap.rb
lib/rack/utils.rb
lib/rack/adapter/camping.rb
lib/rack/auth/basic.rb
lib/rack/auth/openid.rb
lib/rack/handler/cgi.rb
lib/rack/handler/evented_mongrel.rb
lib/rack/handler/fastcgi.rb
lib/rack/handler/lsws.rb
lib/rack/handler/mongrel.rb
lib/rack/handler/scgi.rb
lib/rack/handler/swiftiplied_mongrel.rb
lib/rack/handler/thin.rb
lib/rack/handler/webrick.rb
lib/rack/session/cookie.rb
lib/rack/session/memcache.rb
lib/rack/session/pool.rb

require ‘cgi‘

Methods

call   release   version  

Classes and Modules

Module Rack::Adapter
Module Rack::Auth
Module Rack::Handler
Module Rack::Mime
Module Rack::Session
Module Rack::Utils
Class Rack::Builder
Class Rack::Cascade
Class Rack::CommonLogger
Class Rack::ConditionalGet
Class Rack::ContentLength
Class Rack::Deflater
Class Rack::Directory
Class Rack::File
Class Rack::ForwardRequest
Class Rack::Forwarder
Class Rack::Head
Class Rack::Lint
Class Rack::Lobster
Class Rack::MethodOverride
Class Rack::MockRequest
Class Rack::MockResponse
Class Rack::Recursive
Class Rack::Reloader
Class Rack::Request
Class Rack::Response
Class Rack::ShowExceptions
Class Rack::ShowStatus
Class Rack::Static
Class Rack::URLMap

Constants

VERSION = [0,1]   The Rack protocol version number implemented.

Public Class methods

Return the Rack release as a dotted string.

[Source]

    # File lib/rack.rb, line 25
25:   def self.release
26:     "0.9"
27:   end

Return the Rack protocol version as a dotted string.

[Source]

    # File lib/rack.rb, line 20
20:   def self.version
21:     VERSION.join(".")
22:   end

Public Instance methods

[Source]

    # File lib/rack/lobster.rb, line 32
32:     def call(env)
33:       req = Request.new(env)
34:       if req.GET["flip"] == "left"
35:         lobster = LobsterString.split("\n").
36:           map { |line| line.ljust(42).reverse }.
37:           join("\n")
38:         href = "?flip=right"
39:       elsif req.GET["flip"] == "crash"
40:         raise "Lobster crashed"
41:       else
42:         lobster = LobsterString
43:         href = "?flip=left"
44:       end
45: 
46:       res = Response.new
47:       res.write "<title>Lobstericious!</title>"
48:       res.write "<pre>"
49:       res.write lobster
50:       res.write "</pre>"
51:       res.write "<p><a href='#{href}'>flip!</a></p>"
52:       res.write "<p><a href='?flip=crash'>crash!</a></p>"
53:       res.finish
54:     end

[Validate]