Class: Waves::Matchers::URI

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

Instance Attribute Summary

Attributes inherited from Base

#constraints

Instance Method Summary collapse

Methods inherited from Base

#[], #test

Constructor Details

#initialize(options) ⇒ URI

Returns a new instance of URI.



7
8
9
10
# File 'lib/matchers/uri.rb', line 7

def initialize( options )
  @path = Waves::Matchers::Path.new( options[ :path ] )
  @constraints = { :server => options[ :server ], :scheme => options[ :scheme ] }
end

Instance Method Details

#call(request) ⇒ Object



12
13
14
# File 'lib/matchers/uri.rb', line 12

def call( request )
  @path.call( request ) if test( request )
end