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
1329 1330 1331 1332 1333 1334 1335 1336 |
# File 'lib/cgialt/core.rb', line 1329 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
1337 1338 1339 1340 |
# File 'lib/cgialt/core.rb', line 1337 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
1326 1327 1328 |
# File 'lib/cgialt/core.rb', line 1326 def set_params(params) @params = params end |
#to_a ⇒ Object Also known as: to_ary
1342 1343 1344 |
# File 'lib/cgialt/core.rb', line 1342 def to_a @params || [self] end |