Class: RSpec::Mocks::ArgumentMatchers::InstanceOf

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mocks/argument_matchers.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ InstanceOf

Returns a new instance of InstanceOf.



129
130
131
# File 'lib/rspec/mocks/argument_matchers.rb', line 129

def initialize(klass)
  @klass = klass
end

Instance Method Details

#==(actual) ⇒ Object



133
134
135
# File 'lib/rspec/mocks/argument_matchers.rb', line 133

def ==(actual)
  actual.instance_of?(@klass)
end