method

new

rails latest stable - Class: ActionController::Integration::Session::StubCGI

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

new(env, stdinput = nil)
public

No documentation available.

# File actionpack/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