Class: Crspec::Mock::ArgumentMatchers::KindOf
- Inherits:
-
Object
- Object
- Crspec::Mock::ArgumentMatchers::KindOf
- Defined in:
- lib/crspec/mock/argument_matchers.rb
Instance Method Summary collapse
- #===(actual) ⇒ Object (also: #==)
-
#initialize(klass) ⇒ KindOf
constructor
A new instance of KindOf.
- #inspect ⇒ Object
Constructor Details
#initialize(klass) ⇒ KindOf
Returns a new instance of KindOf.
71 72 73 |
# File 'lib/crspec/mock/argument_matchers.rb', line 71 def initialize(klass) @klass = klass end |
Instance Method Details
#===(actual) ⇒ Object Also known as: ==
75 |
# File 'lib/crspec/mock/argument_matchers.rb', line 75 def ===(actual) = actual.is_a?(@klass) |
#inspect ⇒ Object
78 |
# File 'lib/crspec/mock/argument_matchers.rb', line 78 def inspect = "kind_of(#{@klass})" |