Class: Waves::Matchers::Accept

Inherits:
Base show all
Defined in:
lib/matchers/accept.rb

Instance Attribute Summary

Attributes inherited from Base

#constraints

Instance Method Summary collapse

Methods inherited from Base

#[], #test

Constructor Details

#initialize(options) ⇒ Accept

Returns a new instance of Accept.



7
8
9
10
11
12
13
# File 'lib/matchers/accept.rb', line 7

def initialize( options )
  @constraints = {
    :accept => options[ :accept ],
    :lang => options[ :lang ],
    :charset => options[ :charset ]
  }
end

Instance Method Details

#call(request) ⇒ Object



15
# File 'lib/matchers/accept.rb', line 15

def call( request ) ; test( request ) ; end