Class: RSpec::Mocks::ArgumentMatchers::KindOf

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

Instance Method Summary (collapse)

Constructor Details

- (KindOf) initialize(klass)

A new instance of KindOf

139
140
141
# File 'lib/rspec/mocks/argument_matchers.rb', line 139
def initialize(klass)
  @klass = klass
end

Instance Method Details

- (Object) ==(actual)

143
144
145
# File 'lib/rspec/mocks/argument_matchers.rb', line 143
def ==(actual)
  actual.kind_of?(@klass)
end