Class: RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher
- Inherits:
-
Object
- Object
- RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher
- Defined in:
- lib/rspec/mocks/argument_matchers.rb
Instance Method Summary (collapse)
- - (Object) ==(value)
-
- (DuckTypeMatcher) initialize(*methods_to_respond_to)
constructor
A new instance of DuckTypeMatcher.
Constructor Details
- (DuckTypeMatcher) initialize(*methods_to_respond_to)
A new instance of DuckTypeMatcher
87 88 89 |
# File 'lib/rspec/mocks/argument_matchers.rb', line 87 def initialize(*methods_to_respond_to) @methods_to_respond_to = methods_to_respond_to end |
Instance Method Details
- (Object) ==(value)
91 92 93 |
# File 'lib/rspec/mocks/argument_matchers.rb', line 91 def ==(value) @methods_to_respond_to.all? {|| value.respond_to?()} end |