Class: Crspec::Mock::ArgumentMatchers::InstanceOf
- Inherits:
-
Object
- Object
- Crspec::Mock::ArgumentMatchers::InstanceOf
- Defined in:
- lib/crspec/mock/argument_matchers.rb
Instance Method Summary collapse
- #===(actual) ⇒ Object (also: #==)
-
#initialize(klass) ⇒ InstanceOf
constructor
A new instance of InstanceOf.
- #inspect ⇒ Object
Constructor Details
#initialize(klass) ⇒ InstanceOf
Returns a new instance of InstanceOf.
60 61 62 |
# File 'lib/crspec/mock/argument_matchers.rb', line 60 def initialize(klass) @klass = klass end |
Instance Method Details
#===(actual) ⇒ Object Also known as: ==
64 |
# File 'lib/crspec/mock/argument_matchers.rb', line 64 def ===(actual) = actual.instance_of?(@klass) |
#inspect ⇒ Object
67 |
# File 'lib/crspec/mock/argument_matchers.rb', line 67 def inspect = "an_instance_of(#{@klass})" |