Class: Matchi::Eql
- Inherits:
- BasicObject
- Defined in:
- lib/matchi/eql.rb
Overview
Equivalence matcher.
Instance Method Summary collapse
-
#initialize(expected) ⇒ Eql
constructor
Initialize the matcher with an object.
-
#matches? ⇒ Boolean
Comparison between actual and expected values.
Constructor Details
#initialize(expected) ⇒ Eql
Initialize the matcher with an object.
10 11 12 |
# File 'lib/matchi/eql.rb', line 10 def initialize(expected) @expected = expected end |
Instance Method Details
#matches? ⇒ Boolean
Returns Comparison between actual and expected values.
21 22 23 |
# File 'lib/matchi/eql.rb', line 21 def matches? @expected.eql?(yield) end |