Class: HttpStub::Server::Stub::Match::Rule::Parameters

Inherits:
HashWithIndifferentAccess
  • Object
show all
Includes:
Extensions::Core::Hash::Formatted
Defined in:
lib/http_stub/server/stub/match/rule/parameters.rb

Instance Method Summary collapse

Methods included from Extensions::Core::Hash::Formatted

#to_s

Constructor Details

#initialize(parameters) ⇒ Parameters

Returns a new instance of Parameters.


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

def initialize(parameters)
  super(parameters || {}, "=", "&")
end

Instance Method Details

#matches?(request, _logger) ⇒ Boolean

Returns:

  • (Boolean)

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

def matches?(request, _logger)
  HttpStub::Server::Stub::Match::HashMatcher.match?(self, request.parameters)
end