Class: Waves::Matchers::ContentType
- Defined in:
- lib/matchers/content_type.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(request) ⇒ Object
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 …
-
#initialize(content_type) ⇒ ContentType
constructor
A new instance of ContentType.
Methods inherited from Base
Constructor Details
#initialize(content_type) ⇒ ContentType
Returns a new instance of ContentType.
7 |
# File 'lib/matchers/content_type.rb', line 7 def initialize( content_type ) ; @constraints = { :content_type => content_type } ; end |
Instance Method Details
#call(request) ⇒ Object
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 … ?
11 |
# File 'lib/matchers/content_type.rb', line 11 def call( request ) ; test( request ) ; end |