Class: HttpStub::Server::Stub::Match::Rule::SimpleBody
- Inherits:
-
Object
- Object
- HttpStub::Server::Stub::Match::Rule::SimpleBody
- Defined in:
- lib/http_stub/server/stub/match/rule/simple_body.rb
Instance Method Summary collapse
-
#initialize(body) ⇒ SimpleBody
constructor
A new instance of SimpleBody.
- #matches?(request, _logger) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(body) ⇒ SimpleBody
Returns a new instance of SimpleBody.
9 10 11 |
# File 'lib/http_stub/server/stub/match/rule/simple_body.rb', line 9 def initialize(body) @body = body end |
Instance Method Details
#matches?(request, _logger) ⇒ Boolean
13 14 15 |
# File 'lib/http_stub/server/stub/match/rule/simple_body.rb', line 13 def matches?(request, _logger) HttpStub::Server::Stub::Match::StringValueMatcher.match?(@body, request.body) end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/http_stub/server/stub/match/rule/simple_body.rb', line 17 def to_s @body end |