Class: Cgi_is_retarded
- Inherits:
-
Object
- Object
- Cgi_is_retarded
- 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
- #cgi ⇒ Object
- #content_type ⇒ Object
- #env_table ⇒ Object
- #params ⇒ Object
- #print(arg) ⇒ Object
- #request_method ⇒ Object
Instance Method Details
#cgi ⇒ Object
20 21 22 23 |
# File 'lib/scripts/knjappserver_cgi.rb', line 20 def cgi @cgi = CGI.new if !@cgi return @cgi end |
#content_type ⇒ Object
16 17 18 |
# File 'lib/scripts/knjappserver_cgi.rb', line 16 def content_type return ENV["CONTENT_TYPE"] end |
#env_table ⇒ Object
8 9 10 |
# File 'lib/scripts/knjappserver_cgi.rb', line 8 def env_table return ENV end |
#params ⇒ Object
25 26 27 |
# File 'lib/scripts/knjappserver_cgi.rb', line 25 def params return self.cgi.params end |
#print(arg) ⇒ Object
29 30 31 |
# File 'lib/scripts/knjappserver_cgi.rb', line 29 def print(arg) Kernel.print arg.to_s end |
#request_method ⇒ Object
12 13 14 |
# File 'lib/scripts/knjappserver_cgi.rb', line 12 def request_method return ENV["REQUEST_METHOD"] end |