about summary refs log tree commit homepage
path: root/lib/raindrops/middleware/proxy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/raindrops/middleware/proxy.rb')
-rw-r--r--lib/raindrops/middleware/proxy.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/raindrops/middleware/proxy.rb b/lib/raindrops/middleware/proxy.rb
index 53e14b5..51be3eb 100644
--- a/lib/raindrops/middleware/proxy.rb
+++ b/lib/raindrops/middleware/proxy.rb
@@ -1,7 +1,7 @@
 # -*- encoding: binary -*-
 # :stopdoc:
-# This class is by Raindrops::Middleware to proxy application response
-# bodies.  There should be no need to use it directly.
+# This class is used by Raindrops::Middleware to proxy application
+# response bodies.  There should be no need to use it directly.
 class Raindrops::Middleware::Proxy
   def initialize(body, stats)
     @body, @stats = body, stats
@@ -31,4 +31,11 @@ class Raindrops::Middleware::Proxy
     m = m.to_sym
     :close == m || @body.respond_to?(m)
   end
+
+  # Rack::BodyProxy objects use +method_missing+ to delegate methods
+  # to their bodies
+  def method_missing(*args, &block)
+    @body.send(*args, &block)
+  end
+
 end