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

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

Instance Method Summary (collapse)

Constructor Details

- (InstanceOf) initialize(klass)



234
235
236
# File 'lib/rspec/mocks/argument_matchers.rb', line 234

def initialize(klass)
  @klass = klass
end

Instance Method Details

- (Object) ===(actual)



238
239
240
# File 'lib/rspec/mocks/argument_matchers.rb', line 238

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

- (Object) description



242
243
244
# File 'lib/rspec/mocks/argument_matchers.rb', line 242

def description
  "an_instance_of(#{@klass.name})"
end