Class: Expect::Matcher::Match Private
- Inherits:
- BasicObject
- Defined in:
- lib/expect/matcher/match.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Provides the implementation for ‘match`.
Instance Method Summary collapse
-
#initialize(expected) ⇒ Match
constructor
private
A new instance of Match.
-
#matches? ⇒ Boolean
private
Comparison between actual and expected values.
Constructor Details
#initialize(expected) ⇒ Match
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Match.
5 6 7 |
# File 'lib/expect/matcher/match.rb', line 5 def initialize(expected) @expected = expected end |
Instance Method Details
#matches? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Comparison between actual and expected values.
10 11 12 |
# File 'lib/expect/matcher/match.rb', line 10 def matches? !@expected.match(yield).nil? end |