Class: RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rspec-mocks/lib/rspec/mocks/argument_matchers.rb |
Class Method Summary
- .new(*methods_to_respond_to) ⇒ DuckTypeMatcher constructor Internal use only
Instance Method Summary
- #===(value) Internal use only
- #description Internal use only
Instance Method Details
#===(value)
[ GitHub ]# File 'rspec-mocks/lib/rspec/mocks/argument_matchers.rb', line 311
def ===(value) @methods_to_respond_to.all? { || value.respond_to?( ) } end
#description
[ GitHub ]# File 'rspec-mocks/lib/rspec/mocks/argument_matchers.rb', line 315
def description "duck_type(#{@methods_to_respond_to.map(&:inspect).join(', ')})" end