Changeset 240 for trunk/lib/camping.rb
- Timestamp:
- 12/26/2007 08:20:53 (8 months ago)
- Files:
-
- 1 modified
-
trunk/lib/camping.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/camping.rb
r239 r240 35 35 @cookies,@input=@k.dup,q.dup end;def service *a;@body=send @method,*a 36 36 headers['Set-Cookie']=cookies.map{|k,v|"#{k}=#{C.escape(v)}; path=#{self/ 37 "/"}"if v!=@k[k]}-[nil];self end;def to_s;"Status: #@status#{Z+(headers. map{38 |k,v|[*v].map{|x|[k,v]*": "}}*Z).gsub(Z*2,Z)+Z+Z}#@body"end37 "/"}"if v!=@k[k]}-[nil];self end;def to_s;"Status: #@status#{Z+(headers.inject([ 38 ]){|a,o|[*o[1]].map{|x|a<<[o[0],v]*": "if v&&v.to_s.any?}}*Z)+Z+Z}#@body"end 39 39 end;X=module Controllers;@r=[];class<<self;def r;@r end;def R *u;r=@r 40 40 Class.new{meta_def(:urls){u};meta_def(:inherited){|x|r<<x}}end
