public
Rubygem
Description: Ramaze is a simple, light and modular open-source web application framework written in Ruby.
Homepage: http://ramaze.net
Clone URL: git://github.com/manveru/ramaze.git
Click here to lend your support to: ramaze and make a donation at www.pledgie.com !
Simplify Request#[]
manveru (author)
Sat Oct 04 21:30:40 -0700 2008
commit  70f4b7cfc4f1d8c23c9dc6432a54e1ce1954218f
tree    c61dad286f1f93557db0b428fa6b5b1480064f9c
parent  ed5b2e37d13ccb55c3ec659096c306265a864aeb
...
59
60
61
62
63
64
65
 
 
66
67
68
...
59
60
61
 
 
 
 
62
63
64
65
66
0
@@ -59,10 +59,8 @@ module Ramaze
0
     end
0
 
0
     def [](key, *rest)
0
-      value = params[key.to_s]
0
-      return value if rest.empty?
0
-      keys = rest.flatten.map{|k| k.to_s}
0
-      Array[value, *params.values_at(*keys)]
0
+      return params[key.to_s] if rest.empty?
0
+      [key, *rest].map{|k| params[k.to_s] }
0
     end
0
 
0
     def to_ivs(*args)

Comments