Module: Rack::PageCaching::Utils

Defined in:
lib/rack/page_caching/utils.rb

Class Method Summary collapse

Class Method Details

.gzip_level(gzip) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/rack/page_caching/utils.rb', line 4

def self.gzip_level(gzip)
  case gzip
  when Symbol
    Zlib.const_get(gzip.to_s.upcase)
  when Fixnum
    gzip
  else
    false
  end
end