class HttpStub::Server::Stub::Match::Rule::Method

Public Class Methods

new(method) click to toggle source
# File lib/http_stub/server/stub/match/rule/method.rb, line 9
def initialize(method)
  @method = method.try(:to_s).try(:upcase)
end

Public Instance Methods

matches?(request, _logger) click to toggle source
# File lib/http_stub/server/stub/match/rule/method.rb, line 13
def matches?(request, _logger)
  @method.blank? || @method.casecmp(request.method).zero?
end
to_s() click to toggle source
# File lib/http_stub/server/stub/match/rule/method.rb, line 17
def to_s
  @method || ""
end