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.



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

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.



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

def env_table
  @env_table
end

#stdinputObject

Returns the value of attribute stdinput.



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

def stdinput
  @stdinput
end

#stdoutputObject

Returns the value of attribute stdoutput.



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

def stdoutput
  @stdoutput
end