Class: RSpec::Mocks::ArgumentMatchers::KindOf
- Inherits:
-
Object
- Object
- RSpec::Mocks::ArgumentMatchers::KindOf
- Defined in:
- lib/rspec/mocks/argument_matchers.rb
Instance Method Summary collapse
- #==(actual) ⇒ Object
-
#initialize(klass) ⇒ KindOf
constructor
A new instance of KindOf.
Constructor Details
#initialize(klass) ⇒ KindOf
Returns a new instance of KindOf.
132 133 134 |
# File 'lib/rspec/mocks/argument_matchers.rb', line 132 def initialize(klass) @klass = klass end |
Instance Method Details
#==(actual) ⇒ Object
136 137 138 |
# File 'lib/rspec/mocks/argument_matchers.rb', line 136 def ==(actual) actual.kind_of?(@klass) end |