Class: CGIEmu
Defined Under Namespace
Classes: EnvTable
Instance Attribute Summary collapse
-
#out_content ⇒ Object
readonly
Returns the value of attribute out_content.
-
#out_params ⇒ Object
readonly
Returns the value of attribute out_params.
-
#output_cookies ⇒ Object
readonly
made by CGI::Session.
Instance Method Summary collapse
- #env_table ⇒ Object
-
#initialize(options) ⇒ CGIEmu
constructor
A new instance of CGIEmu.
- #out(params, &block) ⇒ Object
- #stdinput ⇒ Object
Methods inherited from CGI
#cgidump, fix_env, #parameters, #query_parameters, #request_parameters
Constructor Details
#initialize(options) ⇒ CGIEmu
Returns a new instance of CGIEmu.
74 75 76 77 78 79 |
# File 'lib/cuca/cgi_emu.rb', line 74 def initialize() @content = ['CONTENT'] || '' .delete('CONTENT') @test_options = super() end |
Instance Attribute Details
#out_content ⇒ Object (readonly)
Returns the value of attribute out_content.
8 9 10 |
# File 'lib/cuca/cgi_emu.rb', line 8 def out_content @out_content end |
#out_params ⇒ Object (readonly)
Returns the value of attribute out_params.
7 8 9 |
# File 'lib/cuca/cgi_emu.rb', line 7 def out_params @out_params end |
#output_cookies ⇒ Object (readonly)
made by CGI::Session
10 11 12 |
# File 'lib/cuca/cgi_emu.rb', line 10 def @output_cookies end |
Instance Method Details
#env_table ⇒ Object
66 67 68 |
# File 'lib/cuca/cgi_emu.rb', line 66 def env_table EnvTable.new(@test_options) end |
#out(params, &block) ⇒ Object
81 82 83 84 |
# File 'lib/cuca/cgi_emu.rb', line 81 def out(params, &block) @out_params = params @out_content = block.call end |
#stdinput ⇒ Object
70 71 72 |
# File 'lib/cuca/cgi_emu.rb', line 70 def stdinput StringIO.new(@content) end |