Class: Ward::Matchers::Match
- Defined in:
- lib/ward/matchers/match.rb
Overview
Tests whether the validation value matches the expected value with a regular expression.
Instance Attribute Summary
Attributes inherited from Matcher
Instance Method Summary collapse
-
#matches?(actual) ⇒ Boolean
Returns whether the given value matches the expected value.
Methods inherited from Matcher
#customise_error_values, error_id, #initialize
Constructor Details
This class inherits a constructor from Ward::Matchers::Matcher
Instance Method Details
#matches?(actual) ⇒ Boolean
Returns whether the given value matches the expected value.
23 24 25 |
# File 'lib/ward/matchers/match.rb', line 23 def matches?(actual) actual.match(@expected) end |