Class: HttpStub::Server::Stub::Match::Rule::Uri

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/server/stub/match/rule/uri.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Uri

Returns a new instance of Uri.


9
10
11
# File 'lib/http_stub/server/stub/match/rule/uri.rb', line 9

def initialize(uri)
  @uri = uri
end

Instance Method Details

#matches?(request, _logger) ⇒ Boolean

Returns:

  • (Boolean)

13
14
15
# File 'lib/http_stub/server/stub/match/rule/uri.rb', line 13

def matches?(request, _logger)
  HttpStub::Server::Stub::Match::StringValueMatcher.match?(@uri, request.uri)
end

#to_sObject


17
18
19
# File 'lib/http_stub/server/stub/match/rule/uri.rb', line 17

def to_s
  @uri
end