Class: Crspec::Mock::ArgumentMatchers::InstanceOf

Inherits:
Object
  • Object
show all
Defined in:
lib/crspec/mock/argument_matchers.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ InstanceOf

Returns a new instance of InstanceOf.



60
61
62
# File 'lib/crspec/mock/argument_matchers.rb', line 60

def initialize(klass)
  @klass = klass
end

Instance Method Details

#===(actual) ⇒ Object Also known as: ==



64
# File 'lib/crspec/mock/argument_matchers.rb', line 64

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

#inspectObject



67
# File 'lib/crspec/mock/argument_matchers.rb', line 67

def inspect = "an_instance_of(#{@klass})"