Class: Cgi_is_retarded

Inherits:
Object
  • Object
show all
Defined in:
lib/scripts/knjappserver_cgi.rb

Overview

This scripts start an appserver, executes a HTTP-request and terminates. Good for programming appserver-supported projects without running an appserver all the time, but really slow because of startup for every request.

Instance Method Summary collapse

Instance Method Details

#cgiObject



20
21
22
23
# File 'lib/scripts/knjappserver_cgi.rb', line 20

def cgi
  @cgi = CGI.new if !@cgi
  return @cgi
end

#content_typeObject



16
17
18
# File 'lib/scripts/knjappserver_cgi.rb', line 16

def content_type
  return ENV["CONTENT_TYPE"]
end

#env_tableObject



8
9
10
# File 'lib/scripts/knjappserver_cgi.rb', line 8

def env_table
  return ENV
end

#paramsObject



25
26
27
# File 'lib/scripts/knjappserver_cgi.rb', line 25

def params
  return self.cgi.params
end


29
30
31
# File 'lib/scripts/knjappserver_cgi.rb', line 29

def print(arg)
  Kernel.print arg.to_s
end

#request_methodObject



12
13
14
# File 'lib/scripts/knjappserver_cgi.rb', line 12

def request_method
  return ENV["REQUEST_METHOD"]
end