Class: Spec::Mocks::ArgumentConstraints::KindOf
- Defined in:
- lib/gems/rspec-1.1.12/lib/spec/mocks/argument_constraints.rb
Instance Method Summary collapse
- #==(actual) ⇒ Object
-
#initialize(klass) ⇒ KindOf
constructor
A new instance of KindOf.
Constructor Details
#initialize(klass) ⇒ KindOf
Returns a new instance of KindOf.
136 137 138 |
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/argument_constraints.rb', line 136 def initialize(klass) @klass = klass end |
Instance Method Details
#==(actual) ⇒ Object
140 141 142 |
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/argument_constraints.rb', line 140 def ==(actual) actual.kind_of?(@klass) end |