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() @test_path_info = ['PATH_INFO'] || '/' @test_query_params = ['QUERY_PARAMS'] || {} @request_method = ['REQUEST_METHOD'] || 'GET' @content_length = ['CONTENT_LENGTH'] || 0 @http_cookie = ['HTTP_COOKIE'] the_env_table.each_pair { |k,v| ENV[k] = v.to_s } # ENV.merge(the_env_table) end |