Module: CGI::QueryExtension::Value
- Defined in:
- lib/cgialt/core.rb
Overview
:nodoc:
Instance Method Summary collapse
- #[](idx, *args) ⇒ Object
- #first ⇒ Object (also: #last)
- #set_params(params) ⇒ Object
- #to_a ⇒ Object (also: #to_ary)
Instance Method Details
#[](idx, *args) ⇒ Object
1295 1296 1297 1298 1299 1300 1301 1302 |
# File 'lib/cgialt/core.rb', line 1295 def [](idx, *args) if args.size == 0 warn "#{caller(1)[0]}:CAUTION! cgi['key'] == cgi.params['key'][0]; if want Array, use cgi.params['key']" @params[idx] else super[idx,*args] end end |
#first ⇒ Object Also known as: last
1303 1304 1305 1306 |
# File 'lib/cgialt/core.rb', line 1303 def first warn "#{caller(1)[0]}:CAUTION! cgi['key'] == cgi.params['key'][0]; if want Array, use cgi.params['key']" self end |
#set_params(params) ⇒ Object
1292 1293 1294 |
# File 'lib/cgialt/core.rb', line 1292 def set_params(params) @params = params end |
#to_a ⇒ Object Also known as: to_ary
1308 1309 1310 |
# File 'lib/cgialt/core.rb', line 1308 def to_a @params || [self] end |