Class: RSpec::Mocks::ArgumentMatchers::InstanceOf
- Inherits:
-
Object
- Object
- RSpec::Mocks::ArgumentMatchers::InstanceOf
- Defined in:
- lib/rspec/mocks/argument_matchers.rb
Instance Method Summary (collapse)
- - (Object) ==(actual)
-
- (InstanceOf) initialize(klass)
constructor
A new instance of InstanceOf.
Constructor Details
- (InstanceOf) initialize(klass)
A new instance of InstanceOf
117 118 119 |
# File 'lib/rspec/mocks/argument_matchers.rb', line 117 def initialize(klass) @klass = klass end |
Instance Method Details
- (Object) ==(actual)
121 122 123 |
# File 'lib/rspec/mocks/argument_matchers.rb', line 121 def ==(actual) actual.instance_of?(@klass) end |