Class: HttpStub::Models::ValueMatcher
- Inherits:
-
Object
- Object
- HttpStub::Models::ValueMatcher
- Defined in:
- lib/http_stub/models/value_matcher.rb
Instance Method Summary collapse
-
#initialize(stub_value) ⇒ ValueMatcher
constructor
A new instance of ValueMatcher.
- #match?(actual_value) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(stub_value) ⇒ ValueMatcher
Returns a new instance of ValueMatcher.
14 15 16 |
# File 'lib/http_stub/models/value_matcher.rb', line 14 def initialize(stub_value) @stub_value = stub_value end |
Instance Method Details
#match?(actual_value) ⇒ Boolean
18 19 20 |
# File 'lib/http_stub/models/value_matcher.rb', line 18 def match?(actual_value) !!MATCHERS.find { |matcher| matcher.match?(@stub_value, actual_value) } end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/http_stub/models/value_matcher.rb', line 22 def to_s @stub_value end |