Top Level Namespace

Defined Under Namespace

Modules: Rack, Redirect

Constant Summary collapse

APP =
{}

Instance Method Summary collapse

Instance Method Details

#redirect(*redirects) ⇒ Object



47
48
49
50
51
52
53
54
55
56
# File 'lib/redirect.rb', line 47

def redirect(*redirects)

  Redirect.app = Rack::Redirect.new(*redirects)
  if Redirect.autorun
    Rack::Handler::WEBrick.run \
      Rack::ShowExceptions.new(Rack::Lint.new(Redirect.app)),
      :Port => 3000
    run Redirect.app
  end
end