Class: Matchi::BeAnInstanceOf
- Inherits:
-
BeInstanceOf
- Object
- BeInstanceOf
- Matchi::BeAnInstanceOf
- Defined in:
- lib/matchi/rspec/be_an_instance_of.rb
Overview
Type/class matcher.
Instance Method Summary collapse
-
#to_h ⇒ Hash
Returns a hash of one key-value pair with a key corresponding to the matcher and a value corresponding to its initialize parameters.
-
#to_s ⇒ String
Returns a string representing the matcher.
Methods inherited from BeInstanceOf
Constructor Details
This class inherits a constructor from Matchi::BeInstanceOf
Instance Method Details
#to_h ⇒ Hash
Returns a hash of one key-value pair with a key corresponding to the
matcher and a value corresponding to its initialize parameters.
18 19 20 |
# File 'lib/matchi/rspec/be_an_instance_of.rb', line 18 def to_h { BeAnInstanceOf: [@expected] } end |
#to_s ⇒ String
Returns a string representing the matcher.
10 11 12 |
# File 'lib/matchi/rspec/be_an_instance_of.rb', line 10 def to_s "be_an_instance_of #{@expected.inspect}" end |