Sha256: 5de3bd9313103a527fffb1e2f01692d569fecd4583b0943021fd1b7fc90a4a93

Contents?: true

Size: 432 Bytes

Versions: 6

Compression:

Stored size: 432 Bytes

Contents

module Waves

  module Matchers

    class ContentType < Base
      
      def initialize( content_type ) ; @constraints = { :content_type => content_type } ; end
    
      # we could maybe do something more sophisticated here, matching against content type patterns
      # such */html or */xml, etc.; adapt from the matching done on accepts ... ?
      def call( request ) ; test( request ) ; end
      
    end
    
  end
  
end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
dyoder-waves-0.8.0 lib/matchers/content_type.rb
waves-edge-2009.03.10.13.14 lib/matchers/content_type.rb
waves-stable-2009.3.10 lib/matchers/content_type.rb
waves-0.8.0 lib/matchers/content_type.rb
waves-0.8.1 lib/matchers/content_type.rb
waves-0.8.2 lib/matchers/content_type.rb