Class: ActionController::Integration::Session::StubCGI

Inherits:
CGI
  • Object
show all
Defined in:
lib/action_controller/integration.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CGI

escapeHTML, escapeHTML_fail_on_nil

Methods included from CgiExt::Stdinput

included, #initialize_with_stdinput

Constructor Details

#initialize(env, stdinput = nil) ⇒ StubCGI

Returns a new instance of StubCGI.



221
222
223
224
225
226
227
228
# File 'lib/action_controller/integration.rb', line 221

def initialize(env, stdinput = nil)
  self.env_table = env
  self.stdoutput = StringIO.new

  super

  @stdinput = stdinput.is_a?(IO) ? stdinput : StringIO.new(stdinput || '')
end

Instance Attribute Details

#env_tableObject

Returns the value of attribute env_table.



219
220
221
# File 'lib/action_controller/integration.rb', line 219

def env_table
  @env_table
end

#stdinputObject

Returns the value of attribute stdinput.



219
220
221
# File 'lib/action_controller/integration.rb', line 219

def stdinput
  @stdinput
end

#stdoutputObject

Returns the value of attribute stdoutput.



219
220
221
# File 'lib/action_controller/integration.rb', line 219

def stdoutput
  @stdoutput
end