Class: Matchi::Equal Private
- Inherits:
- BasicObject
- Defined in:
- lib/matchi/equal.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.
Identity matcher.
Instance Method Summary collapse
-
#initialize(expected) ⇒ Equal
constructor
private
A new instance of Equal.
-
#matches? ⇒ Boolean
private
Comparison between actual and expected values.
Constructor Details
#initialize(expected) ⇒ Equal
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 Equal.
4 5 6 |
# File 'lib/matchi/equal.rb', line 4 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.
9 10 11 |
# File 'lib/matchi/equal.rb', line 9 def matches? @expected.equal?(yield) end |