Class: ActionController::Integration::Session::StubCGI
- Defined in:
- lib/action_controller/integration.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#env_table ⇒ Object
Returns the value of attribute env_table.
-
#stdinput ⇒ Object
Returns the value of attribute stdinput.
-
#stdoutput ⇒ Object
Returns the value of attribute stdoutput.
Instance Method Summary collapse
-
#initialize(env, stdinput = nil) ⇒ StubCGI
constructor
A new instance of StubCGI.
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.
225 226 227 228 229 230 231 232 233 234 |
# File 'lib/action_controller/integration.rb', line 225 def initialize(env, stdinput = nil) self.env_table = env self.stdoutput = StringIO.new super stdinput.set_encoding(Encoding::BINARY) if stdinput.respond_to?(:set_encoding) stdinput.force_encoding(Encoding::BINARY) if stdinput.respond_to?(:force_encoding) @stdinput = stdinput.is_a?(IO) ? stdinput : StringIO.new(stdinput || '') end |
Instance Attribute Details
#env_table ⇒ Object
Returns the value of attribute env_table.
223 224 225 |
# File 'lib/action_controller/integration.rb', line 223 def env_table @env_table end |
#stdinput ⇒ Object
Returns the value of attribute stdinput.
223 224 225 |
# File 'lib/action_controller/integration.rb', line 223 def stdinput @stdinput end |
#stdoutput ⇒ Object
Returns the value of attribute stdoutput.
223 224 225 |
# File 'lib/action_controller/integration.rb', line 223 def stdoutput @stdoutput end |