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

127
128
129
# File 'lib/rspec/mocks/argument_matchers.rb', line 127
def initialize(klass)
  @klass = klass
end

Instance Method Details

- (Object) ==(actual)

131
132
133
# File 'lib/rspec/mocks/argument_matchers.rb', line 131
def ==(actual)
  actual.kind_of?(@klass)
end