about summary refs log tree commit
path: root/lib/metropolis/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/metropolis/common.rb')
-rw-r--r--lib/metropolis/common.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/metropolis/common.rb b/lib/metropolis/common.rb
index 273a1b3..971accd 100644
--- a/lib/metropolis/common.rb
+++ b/lib/metropolis/common.rb
@@ -13,6 +13,15 @@ module Metropolis::Common
     if @readonly && @exclusive
       raise ArgumentError, ":readonly and :exclusive may not be used together"
     end
+    case @encoding = opts[:encoding]
+    when nil
+    when :deflate
+      extend(Metropolis::Deflate)
+    when :gzip
+      extend(Metropolis::Gzip)
+    else
+      raise ArgumentError, "unsupported encoding"
+    end
   end
 
   def r(code, body = nil)