Class: Matchi::Matchers::Eql::Matcher
- Inherits:
-
Object
- Object
- Matchi::Matchers::Eql::Matcher
- Includes:
- Matchi::MatchersBase
- Defined in:
- lib/matchi/matchers/eql.rb
Overview
The matcher.
Instance Method Summary collapse
-
#initialize(expected) ⇒ Matcher
constructor
Initialize the matcher with an object.
-
#matches? ⇒ Boolean
Boolean comparison between the actual value and the expected value.
Methods included from Matchi::MatchersBase
Constructor Details
#initialize(expected) ⇒ Matcher
Initialize the matcher with an object.
20 21 22 |
# File 'lib/matchi/matchers/eql.rb', line 20 def initialize(expected) @expected = expected end |
Instance Method Details
#matches? ⇒ Boolean
Boolean comparison between the actual value and the expected value.
34 35 36 |
# File 'lib/matchi/matchers/eql.rb', line 34 def matches?(*, **) @expected.eql?(yield) end |