Changeset 162
- Timestamp:
- 09/18/2006 07:21:44 (2 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 modified
-
camping-unabridged.rb (modified) (1 diff)
-
camping.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/camping-unabridged.rb
r161 r162 338 338 m=Mab.new({},self) 339 339 s=m.capture{send(*a,&b)} 340 s=m.layout{s} if m.respond_to?:layout340 s=m.layout{s} if /^_/!~a[0].to_s and m.respond_to?:layout 341 341 s 342 342 end -
trunk/lib/camping.rb
r161 r162 9 9 :cookies,:env,:headers,:body,:status,:root;def method_missing*a,&b 10 10 a.shift if a[0]==:render;m=Mab.new({},self);s=m.capture{send(*a,&b)};s=m.layout{s}if 11 m.respond_to?:layout;s end;def r s,b,h={};@status=s;@headers. 11 /^_/!~a[0].to_s and m.respond_to?:layout;s end;def r s,b,h={};@status=s;@headers. 12 12 merge!h;@body=b end;def redirect*a;r 302,'','Location'=>URL(*a)end;Z="\r\n" 13 13 def initialize r,e,m;e=H[e.to_hash];@status,@method,@env,@headers,@root=200,m.
