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.
18 19 20 |
# File 'lib/matchi/matchers/eql.rb', line 18 def initialize(expected) @expected = expected end |
Instance Method Details
#matches? ⇒ Boolean
Boolean comparison between the actual value and the expected value.
32 33 34 |
# File 'lib/matchi/matchers/eql.rb', line 32 def matches? @expected.eql?(yield) end |