Method: CGIEmu::EnvTable#initialize

Defined in:
lib/cuca/cgi_emu.rb

#initialize(options) ⇒ EnvTable

Returns a new instance of EnvTable.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cuca/cgi_emu.rb', line 13

def initialize(options)
 @test_path_info = options['PATH_INFO'] || '/'
 @test_query_params = options['QUERY_PARAMS'] || {}
 @request_method = options['REQUEST_METHOD'] || 'GET'
 @content_length = options['CONTENT_LENGTH'] || 0
 @http_cookie    = options['HTTP_COOKIE']

 the_env_table.each_pair { |k,v| ENV[k] = v.to_s }

#     ENV.merge(the_env_table)
end