Class: RSpec::Mocks::ArgumentMatchers::InstanceOf
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/argument_matchers.rb
Instance Method Summary collapse
- #===(actual) ⇒ Object
- #description ⇒ Object
-
#initialize(klass) ⇒ InstanceOf
constructor
A new instance of InstanceOf.
Constructor Details
#initialize(klass) ⇒ InstanceOf
Returns a new instance of InstanceOf.
278 279 280 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/argument_matchers.rb', line 278 def initialize(klass) @klass = klass end |
Instance Method Details
#===(actual) ⇒ Object
282 283 284 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/argument_matchers.rb', line 282 def ===(actual) actual.instance_of?(@klass) end |
#description ⇒ Object
286 287 288 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/argument_matchers.rb', line 286 def description "an_instance_of(#{@klass.name})" end |