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