Class: Matchi::Matchers::BeInstanceOf::Matcher
- Inherits:
-
Object
- Object
- Matchi::Matchers::BeInstanceOf::Matcher
- Includes:
- MatchersBase
- Defined in:
- lib/matchi/rspec/be_instance_of.rb
Overview
The matcher.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(expected) ⇒ Matcher
constructor
Initialize the matcher with an object.
-
#matches? ⇒ Boolean
Comparison between actual and expected values.
Constructor Details
#initialize(expected) ⇒ Matcher
Initialize the matcher with an object.
19 20 21 |
# File 'lib/matchi/rspec/be_instance_of.rb', line 19 def initialize(expected) @expected = expected end |
Instance Method Details
#matches? ⇒ Boolean
Returns Comparison between actual and expected values.
31 32 33 |
# File 'lib/matchi/rspec/be_instance_of.rb', line 31 def matches? yield.instance_of?(@expected) end |